Skip to content

Commit a6a5446

Browse files
authored
Enable dict-init-mutate extension (#7844)
1 parent 6abd0a0 commit a6a5446

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pylint/extensions/bad_builtin.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818

1919
BAD_FUNCTIONS = ["map", "filter"]
2020
# Some hints regarding the use of bad builtins.
21-
BUILTIN_HINTS = {"map": "Using a list comprehension can be clearer."}
22-
BUILTIN_HINTS["filter"] = BUILTIN_HINTS["map"]
21+
LIST_COMP_MSG = "Using a list comprehension can be clearer."
22+
BUILTIN_HINTS = {"map": LIST_COMP_MSG, "filter": LIST_COMP_MSG}
2323

2424

2525
class BadBuiltinChecker(BaseChecker):

pylintrc

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ load-plugins=
3333
pylint.extensions.redefined_variable_type,
3434
pylint.extensions.comparison_placement,
3535
pylint.extensions.broad_try_clause,
36+
pylint.extensions.dict_init_mutate,
3637

3738
# Use multiple processes to speed up Pylint. Specifying 0 will auto-detect the
3839
# number of processors available to use.

0 commit comments

Comments
 (0)