diff --git a/pyproject.toml b/pyproject.toml index 253c6b70aa..b2a1a3c124 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -146,11 +146,6 @@ exclude_lines = [ # Sources https://google.github.io/styleguide/pylintrc # License: https://github.com/google/styleguide/blob/gh-pages/LICENSE -# Analyse import fallback blocks. This can be used to support both Python 2 and 3 -# compatible code, which means that the block might have code that exists only in -# one or another interpreter, leading to false positives when analysed. -# analyse-fallback-blocks = - # Clear in-memory caches upon conclusion of linting. Useful if running pylint in # a server-like mode. # clear-cache-post-run = @@ -170,11 +165,6 @@ exclude_lines = [ # for backward compatibility.) # extension-pkg-whitelist = -# Return non-zero exit code if any of these messages/categories are detected, -# even if score is above --fail-under value. Syntax same as enable. Messages -# specified are enabled, while categories only check already-enabled messages. -# fail-on = - # Specify a score threshold under which the program will exit with error. fail-under = 10.0 @@ -206,7 +196,7 @@ ignore-patterns = ["^\\.#"] # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the # number of processors available to use, and will cap the count on Windows to # avoid hangs. -# jobs = +jobs = 0 # Control the amount of potential inferred values when inferring a single object. # This can help the performance when dealing with large functions or complex, @@ -525,7 +515,7 @@ known-third-party = ["enchant"] [tool.pylint.logging] # The type of string formatting that logging methods do. `old` means using % # formatting, `new` is for `{}` formatting. -logging-format-style = "old" +logging-format-style = "new" # Logging modules to check that the string format arguments are in logging # function parameter format. @@ -546,7 +536,6 @@ confidence = ["HIGH", "CONTROL_FLOW", "INFERENCE", "INFERENCE_FAILURE", "UNDEFIN # no Warning level messages displayed, use "--disable=all --enable=classes # --disable=W". disable = [ - "consider-using-augmented-assign", "prefer-typing-namedtuple", "attribute-defined-outside-init", "missing-module-docstring", @@ -554,14 +543,10 @@ disable = [ "missing-function-docstring", "too-few-public-methods", "line-too-long", - "too-many-lines", "trailing-whitespace", "missing-final-newline", "trailing-newlines", - "bad-indentation", "unnecessary-semicolon", - "multiple-statements", - "superfluous-parens", "mixed-line-endings", "unexpected-line-ending-format", "fixme", diff --git a/src/databricks/labs/ucx/workspace_access/groups.py b/src/databricks/labs/ucx/workspace_access/groups.py index 41ea229556..fa2ec2e0ac 100644 --- a/src/databricks/labs/ucx/workspace_access/groups.py +++ b/src/databricks/labs/ucx/workspace_access/groups.py @@ -549,7 +549,7 @@ def _get_account_group(self, group_id: str) -> Group | None: return iam.Group.from_dict(raw) # type: ignore[arg-type] except NotFound: # the given group has been removed from the account after getting the group and before running this method - logger.warning("Group with ID: %s does not exist anymore in the Databricks account.", group_id) + logger.warning(f"Group with ID {group_id} does not exist anymore in the Databricks account.") return None 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): return True except NotFound: # the given group has been removed from the account after getting the group and before running this method - logger.warning("Group with ID: %s does not exist anymore in the Databricks account.", account_group_id) + logger.warning(f"Group with ID {account_group_id} does not exist anymore in the Databricks account.") return True def _get_strategy(