Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More pylint tuning #958

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
19 changes: 2 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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.
Expand All @@ -546,22 +536,17 @@ 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",
"missing-class-docstring",
"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",
Expand Down
4 changes: 2 additions & 2 deletions src/databricks/labs/ucx/workspace_access/groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]:
Expand Down Expand Up @@ -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(
Expand Down
Loading