Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
pylint
  • Loading branch information
Liudmila Molkova committed Oct 29, 2024
commit e18f991eb1abef2b05b7883556dd8ade6bcd2a43
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

# Validate UUID format
# Specs taken from https://tools.ietf.org/html/rfc4122
uuid_regex_pattern = re.compile("^[0-9a-f]{8}-" "[0-9a-f]{4}-" "[0-9a-f]{4}-" "[0-9a-f]{4}-" "[0-9a-f]{12}$")
uuid_regex_pattern = re.compile("^[0-9a-f]{8}-" "[0-9a-f]{4}-" + "[0-9a-f]{4}-" "[0-9a-f]{4}-" "[0-9a-f]{12}$")


class ConnectionStringParser:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class _UnsuccessfulQuickPulsePostError(Exception):

class _QuickpulseExporter(MetricExporter):

def __init__(self, **kwargs: Any) -> None:
def __init__(self, **kwargs: Any) -> None: # pylint: disable=unused-argument
"""Metric exporter for Quickpulse.

:param str connection_string: The connection string used for your Application Insights resource.
Expand Down Expand Up @@ -157,9 +157,9 @@ def export(
# If no response, assume unsuccessful
result = MetricExportResult.FAILURE
else:
header = post_response._response_headers.get(
header = post_response._response_headers.get( # pylint: disable=protected-access
_QUICKPULSE_SUBSCRIBED_HEADER_NAME
) # pylint: disable=protected-access
)
if header != "true":
# User leaving the live metrics page will be treated as an unsuccessful
result = MetricExportResult.FAILURE
Expand Down Expand Up @@ -251,9 +251,9 @@ def _ticker(self) -> None:
self._base_monitoring_data_point,
)
if ping_response:
header = ping_response._response_headers.get(
header = ping_response._response_headers.get( # pylint: disable=protected-access
_QUICKPULSE_SUBSCRIBED_HEADER_NAME
) # pylint: disable=protected-access
)
if header and header == "true":
# Switch state to post if subscribed
_set_global_quickpulse_state(_QuickpulseState.POST_SHORT)
Expand Down