Skip to content

Commit c684a5c

Browse files
committed
🚀 Upgrade Python target to 3.13 and refine tool configs
- Update black and ruff to target Python 3.13 - Adjust isort config for 3.13 compatibility - Add commented Django settings option in pytest config - Fix typo in ruff unfixable comment
1 parent 63d1516 commit c684a5c

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

pyproject.toml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[tool.black]
22
line-length = 120
3-
target-version = ["py312"]
3+
target-version = ["py313"]
44

55
[tool.isort]
66
line_length = 115
77
profile = "black"
8-
py_version = 312
8+
py_version = 312 # isort doesn't support 3.13 yet
99
use_parentheses = true
1010
## Ignore the source of the import and just sort alphabetically, with "from" before "import"
1111
combine_as_imports = true
@@ -19,6 +19,8 @@ no_sections = true
1919
python_files = "tests.py test_*.py"
2020
# Disable warnings from third-party libraries
2121
filterwarnings = "ignore::DeprecationWarning"
22+
# If you are using django, set the settings here
23+
# DJANGO_SETTINGS_MODULE = django_project.settings
2224

2325
[tool.ruff]
2426
lint.extend-ignore = [
@@ -81,7 +83,7 @@ lint.select = [
8183
"W", # pycodestyle warnings
8284
"YTT", # flake8 2020
8385
]
84-
target-version = "py312"
86+
target-version = "py313"
8587
# Certain errors we don't want to fix because they are too aggressive,
86-
# especially in the editor (removing variables we haven't used yet
88+
# especially in the editor (removing variables we haven't used yet)
8789
lint.unfixable = ["F401", "F841"]

0 commit comments

Comments
 (0)