Skip to content

Commit

Permalink
Package maintenance
Browse files Browse the repository at this point in the history
===================

- Back to pyright. It just works...
- Kicked Django 4.1 from the testsuite and the classifiers.
  • Loading branch information
oliverandrich committed Mar 8, 2024
1 parent c9c8f56 commit fa637ae
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 116 deletions.
10 changes: 4 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
default_language_version:
python: python3.8
python: python3.9

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand All @@ -25,12 +25,10 @@ repos:
hooks:
- id: ruff

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.7.1"
- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.353
hooks:
- id: mypy
additional_dependencies:
- django-stubs==4.2.7
- id: pyright

- repo: https://github.com/rtts/djhtml
rev: 3.0.6
Expand Down
146 changes: 53 additions & 93 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 10 additions & 15 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ classifiers = [
"Topic :: Utilities",
"Environment :: Web Environment",
"Framework :: Django :: 3.2",
"Framework :: Django :: 4.1",
"Framework :: Django :: 4.2",
"Framework :: Django :: 5.0",
]
Expand All @@ -35,6 +34,7 @@ django = ">=3.2"
certifi = ">=2023.7.22,<2025.0.0"
django-extensions = { version = "^3.2.1", optional = true }
werkzeug = { version = "^3.0.0", optional = true }
django-typer = "^1.0.3"

[tool.poetry.extras]
"django-extensions" = ["django-extensions", "werkzeug"]
Expand All @@ -47,7 +47,7 @@ pytest-django = "^4.5.2"
pytest-cov = "^4.1.0"
pytest-mock = "^3.12.0"
tox = "^4.11.4"
django-stubs = { extras = ["compatible-mypy"], version = "^4.2.7" }
django-types = "^0.19.1"

[build-system]
requires = ["poetry-core"]
Expand All @@ -56,7 +56,7 @@ build-backend = "poetry.core.masonry.api"
# Black
[tool.black]
target-version = ["py38"]
line-length = 100
line-length = 120
skip-string-normalization = true
exclude = '''
/(
Expand All @@ -70,22 +70,17 @@ exclude = '''
)/
'''

# mypy
[tool.mypy]
mypy_path = "src/"
python_version = "3.8"
strict = true
namespace_packages = false
warn_unreachable = true

[[tool.mypy.overrides]]
module = "tests.*"
allow_untyped_defs = true
# Pyright
[tool.pyright]
venvPath = "."
venv = ".venv"
typeCheckingMode = "strict"
ignore = ["./tests/**/*"]

# Ruff
[tool.ruff]
target-version = "py38"
line-length = 100
line-length = 120
select = [
"A",
"ARG",
Expand Down
2 changes: 0 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
isolated_build = true
envlist =
django32-py{38,39,310}
django41-py{38,39,310,311}
django42-py{38,39,310,311,312}
django50-py{310,311,312}

Expand All @@ -21,7 +20,6 @@ deps =
pytest-mock
pytest-django
django32: Django>=3.2,<4.0
django41: Django>=4.1,<4.2
django42: Django>=4.2,<5.0
django50: Django>=5.0,<5.1
extras = django-extensions
Expand Down

0 comments on commit fa637ae

Please sign in to comment.