aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/ruff.toml
diff options
context:
space:
mode:
authorWolfgang Müller2024-11-06 12:34:48 +0100
committerWolfgang Müller2024-11-06 12:34:48 +0100
commit9e7ede5afcbc99a3670ee8232ecfbce79da0dde8 (patch)
tree92b782d654c2f88511f189d7e86b7f9af8eb4017 /ruff.toml
parent9ecf39499a70f7d1e8977aed66fd041356bd9b58 (diff)
downloadlater-9e7ede5afcbc99a3670ee8232ecfbce79da0dde8.tar.gz
Avoid shadowing builtins
This will hopefully avoid nasty surprises in the future. It's easy to check since there is already a ruff linter [1] for it which this commit also enables. Make sure not to complain about exit() [2] since that is only for interactive use and shouldn't be called in programs anyway. [1] https://docs.astral.sh/ruff/rules/builtin-attribute-shadowing/ [2] https://docs.python.org/3.12/library/constants.html#exit
Diffstat (limited to 'ruff.toml')
-rw-r--r--ruff.toml4
1 files changed, 4 insertions, 0 deletions
diff --git a/ruff.toml b/ruff.toml
index 2a53694..d00d37e 100644
--- a/ruff.toml
+++ b/ruff.toml
@@ -8,7 +8,11 @@ select = [
"W", # pycodestyle
"I", # isort
"UP", # pyupgrade
+ "A", # flake8-builtins
"B", # flake8-bugbear
"SIM", # flake8-simplify
"FURB" # refurb
]
+
+[lint.flake8-builtins]
+builtins-ignorelist = ["exit"]