diff options
author | Nick Drozd <nicholasdrozd@gmail.com> | 2022-11-25 01:58:17 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-25 08:58:17 +0100 |
commit | a6a544613fd6cd28c3213751173f1b0e4205d1c0 (patch) | |
tree | efed7c4790b9aca833a2b8b3f2de9f6c75c837d1 | |
parent | 6abd0a03e2ac33c1f96ccdcf06d874ece4c83074 (diff) | |
download | pylint-git-a6a544613fd6cd28c3213751173f1b0e4205d1c0.tar.gz |
Enable dict-init-mutate extension (#7844)
-rw-r--r-- | pylint/extensions/bad_builtin.py | 4 | ||||
-rw-r--r-- | pylintrc | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/pylint/extensions/bad_builtin.py b/pylint/extensions/bad_builtin.py index 7ffaf0f6c..dd6ab3841 100644 --- a/pylint/extensions/bad_builtin.py +++ b/pylint/extensions/bad_builtin.py @@ -18,8 +18,8 @@ if TYPE_CHECKING: BAD_FUNCTIONS = ["map", "filter"] # Some hints regarding the use of bad builtins. -BUILTIN_HINTS = {"map": "Using a list comprehension can be clearer."} -BUILTIN_HINTS["filter"] = BUILTIN_HINTS["map"] +LIST_COMP_MSG = "Using a list comprehension can be clearer." +BUILTIN_HINTS = {"map": LIST_COMP_MSG, "filter": LIST_COMP_MSG} class BadBuiltinChecker(BaseChecker): @@ -33,6 +33,7 @@ load-plugins= pylint.extensions.redefined_variable_type, pylint.extensions.comparison_placement, pylint.extensions.broad_try_clause, + pylint.extensions.dict_init_mutate, # Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the # number of processors available to use. |