Skip to content

Commit a1f9d57

Browse files
Merge pull request #2233 from VWS-Python/chore/pylint-builtin-bans
Ban dynamic builtins and typing.cast in lint config
2 parents ec0a348 + 695314f commit a1f9d57

2 files changed

Lines changed: 53 additions & 41 deletions

File tree

pyproject.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ lint.per-file-ignores."tests/test_*.py" = [
164164
lint.unfixable = [
165165
"ERA001",
166166
]
167+
lint.flake8-tidy-imports.banned-api."typing.cast".msg = "typing.cast is banned: use explicit type narrowing or a typed variable instead."
167168
lint.pydocstyle.convention = "google"
168169

169170
[tool.pylint]
@@ -205,6 +206,17 @@ MASTER.unsafe-load-any-extension = false
205206
MASTER.ignore = [
206207
"_setuptools_scm_version.py",
207208
]
209+
DEPRECATED_BUILTINS.bad-functions = [
210+
# Use Pylint until Ruff can ban bare builtin calls, or until custom rules
211+
# make this removable:
212+
# https://github.com/astral-sh/ruff/issues/10079
213+
# https://github.com/astral-sh/ruff/issues/970
214+
"filter",
215+
"getattr",
216+
"hasattr",
217+
"map",
218+
"setattr",
219+
]
208220
# Enable the message, report, category or checker with the given id(s). You can
209221
# either give multiple identifier separated by comma (,) or put this option
210222
# multiple time (only on the command line, not in the configuration file where

0 commit comments

Comments
 (0)