Skip to content

Commit 928f8b3

Browse files
authored
bandit and pylint (#31881)
1 parent d41443f commit 928f8b3

7 files changed

Lines changed: 9 additions & 7 deletions

File tree

sdk/monitor/azure-monitor-opentelemetry/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
([#31744](https://github.com/Azure/azure-sdk-for-python/pull/31740))
2323
- Add preview warning for Autoinstrumentation entry points
2424
([#31767](https://github.com/Azure/azure-sdk-for-python/pull/31767))
25+
- Bandit and pylint
26+
([#31881](https://github.com/Azure/azure-sdk-for-python/pull/31881))
2527

2628
## 1.0.0b15 (2023-07-17)
2729

sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
SAMPLING_RATIO_ARG,
3535
)
3636
from azure.monitor.opentelemetry._types import ConfigurationValue
37-
from azure.monitor.opentelemetry.exporter import ( # pylint: disable=import-error
37+
from azure.monitor.opentelemetry.exporter import ( # pylint: disable=import-error,no-name-in-module
3838
ApplicationInsightsSampler,
3939
AzureMonitorLogExporter,
4040
AzureMonitorMetricExporter,

sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/_constants.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from os.path import isdir
1111
from pathlib import Path
1212

13-
from azure.monitor.opentelemetry.exporter._connection_string_parser import ( # pylint: disable=import-error
13+
from azure.monitor.opentelemetry.exporter._connection_string_parser import ( # pylint: disable=import-error,no-name-in-module
1414
ConnectionStringParser,
1515
)
1616

sdk/monitor/azure-monitor-opentelemetry/azure/monitor/opentelemetry/diagnostics/_status_logger.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@ def log_status(cls, agent_initialized_successfully, reason=None):
5454
# Change to be hostname and pid
5555
status_logger_file_name = _get_status_logger_file_name(pid)
5656
with open(
57-
join(_STATUS_LOG_PATH, status_logger_file_name), "w"
57+
join(_STATUS_LOG_PATH, status_logger_file_name),
58+
"w",
59+
encoding="utf8"
5860
) as f:
5961
f.seek(0)
6062
f.write(dumps(status_json))

sdk/monitor/azure-monitor-opentelemetry/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ type_check_samples = false
33
verifytypes = false
44
pyright = false
55
mypy = false
6-
pylint = false
7-
bandit = false
6+
pylint = true
7+
bandit = true

sdk/monitor/azure-monitor-opentelemetry/samples/tracing/simple.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from azure.monitor.opentelemetry import configure_azure_monitor
88
from opentelemetry import trace
9-
from opentelemetry.sdk.resources import Resource, ResourceAttributes
109

1110
configure_azure_monitor()
1211

sdk/monitor/azure-monitor-opentelemetry/setup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,6 @@
9696
"opentelemetry-instrumentation-urllib~=0.40b0",
9797
"opentelemetry-instrumentation-urllib3~=0.40b0",
9898
"opentelemetry-sdk~=1.19.0",
99-
"wrapt >= 1.14.0, < 2.0.0",
10099
],
101100
entry_points={
102101
"opentelemetry_distro": [

0 commit comments

Comments
 (0)