Skip to content

Commit

Permalink
fix: fix sonarqube issues with f-string and regex (#1001)
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekzyla authored Apr 22, 2024
1 parent f1bf18a commit c415d0e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion splunk_connect_for_snmp/inventory/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ def generate_conditional_profile(
profile_varbinds = conditional_profile_body.get("varBinds")
profile_frequency = conditional_profile_body.get("frequency")
if not profile_varbinds:
raise BadlyFormattedFieldError(f"No varBinds provided in the profile")
raise BadlyFormattedFieldError("No varBinds provided in the profile")
filtered_snmp_objects = filter_condition_on_database(
mongo_client, address, profile_conditions
)
Expand Down
2 changes: 1 addition & 1 deletion splunk_connect_for_snmp/snmp/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
WALK_RETRY_MAX_INTERVAL = int(os.getenv("WALK_RETRY_MAX_INTERVAL", "180"))
WALK_MAX_RETRIES = int(os.getenv("WALK_MAX_RETRIES", "5"))
SPLUNK_SOURCETYPE_TRAPS = os.getenv("SPLUNK_SOURCETYPE_TRAPS", "sc4snmp:traps")
OID_VALIDATOR = re.compile(r"^([0-2])((\.0)|(\.[1-9][0-9]*))*$")
OID_VALIDATOR = re.compile(r"^([0-2])((\.0)|(\.[1-9]\d*))*$")
RESOLVE_TRAP_ADDRESS = os.getenv("RESOLVE_TRAP_ADDRESS", "false")
MAX_DNS_CACHE_SIZE_TRAPS = int(os.getenv("MAX_DNS_CACHE_SIZE_TRAPS", "100"))
TTL_DNS_CACHE_TRAPS = int(os.getenv("TTL_DNS_CACHE_TRAPS", "1800"))
Expand Down

0 comments on commit c415d0e

Please sign in to comment.