Skip to content

Commit 5db0b02

Browse files
authored
More pylint tuning (#958)
1 parent c8c6037 commit 5db0b02

File tree

2 files changed

+4
-19
lines changed

2 files changed

+4
-19
lines changed

pyproject.toml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,6 @@ exclude_lines = [
146146
# Sources https://google.github.io/styleguide/pylintrc
147147
# License: https://github.com/google/styleguide/blob/gh-pages/LICENSE
148148

149-
# Analyse import fallback blocks. This can be used to support both Python 2 and 3
150-
# compatible code, which means that the block might have code that exists only in
151-
# one or another interpreter, leading to false positives when analysed.
152-
# analyse-fallback-blocks =
153-
154149
# Clear in-memory caches upon conclusion of linting. Useful if running pylint in
155150
# a server-like mode.
156151
# clear-cache-post-run =
@@ -170,11 +165,6 @@ exclude_lines = [
170165
# for backward compatibility.)
171166
# extension-pkg-whitelist =
172167

173-
# Return non-zero exit code if any of these messages/categories are detected,
174-
# even if score is above --fail-under value. Syntax same as enable. Messages
175-
# specified are enabled, while categories only check already-enabled messages.
176-
# fail-on =
177-
178168
# Specify a score threshold under which the program will exit with error.
179169
fail-under = 10.0
180170

@@ -206,7 +196,7 @@ ignore-patterns = ["^\\.#"]
206196
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
207197
# number of processors available to use, and will cap the count on Windows to
208198
# avoid hangs.
209-
# jobs =
199+
jobs = 0
210200

211201
# Control the amount of potential inferred values when inferring a single object.
212202
# This can help the performance when dealing with large functions or complex,
@@ -525,7 +515,7 @@ known-third-party = ["enchant"]
525515
[tool.pylint.logging]
526516
# The type of string formatting that logging methods do. `old` means using %
527517
# formatting, `new` is for `{}` formatting.
528-
logging-format-style = "old"
518+
logging-format-style = "new"
529519

530520
# Logging modules to check that the string format arguments are in logging
531521
# function parameter format.
@@ -546,22 +536,17 @@ confidence = ["HIGH", "CONTROL_FLOW", "INFERENCE", "INFERENCE_FAILURE", "UNDEFIN
546536
# no Warning level messages displayed, use "--disable=all --enable=classes
547537
# --disable=W".
548538
disable = [
549-
"consider-using-augmented-assign",
550539
"prefer-typing-namedtuple",
551540
"attribute-defined-outside-init",
552541
"missing-module-docstring",
553542
"missing-class-docstring",
554543
"missing-function-docstring",
555544
"too-few-public-methods",
556545
"line-too-long",
557-
"too-many-lines",
558546
"trailing-whitespace",
559547
"missing-final-newline",
560548
"trailing-newlines",
561-
"bad-indentation",
562549
"unnecessary-semicolon",
563-
"multiple-statements",
564-
"superfluous-parens",
565550
"mixed-line-endings",
566551
"unexpected-line-ending-format",
567552
"fixme",

src/databricks/labs/ucx/workspace_access/groups.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,7 @@ def _get_account_group(self, group_id: str) -> Group | None:
549549
return iam.Group.from_dict(raw) # type: ignore[arg-type]
550550
except NotFound:
551551
# the given group has been removed from the account after getting the group and before running this method
552-
logger.warning("Group with ID: %s does not exist anymore in the Databricks account.", group_id)
552+
logger.warning(f"Group with ID {group_id} does not exist anymore in the Databricks account.")
553553
return None
554554

555555
def _list_account_groups(self, scim_attributes: str) -> list[iam.Group]:
@@ -591,7 +591,7 @@ def _reflect_account_group_to_workspace(self, account_group_id: str):
591591
return True
592592
except NotFound:
593593
# the given group has been removed from the account after getting the group and before running this method
594-
logger.warning("Group with ID: %s does not exist anymore in the Databricks account.", account_group_id)
594+
logger.warning(f"Group with ID {account_group_id} does not exist anymore in the Databricks account.")
595595
return True
596596

597597
def _get_strategy(

0 commit comments

Comments
 (0)