Skip to content

Commit

Permalink
Merge pull request #72 from snok/upgrade-django-v1
Browse files Browse the repository at this point in the history
Add support for Django v4
  • Loading branch information
sondrelg committed Dec 13, 2021
2 parents 90d541a + 46bb5da commit d506c30
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 108 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ jobs:
matrix:
python-version: [ "3.7", "3.8", "3.9", "3.10" ]
django-version: [ "3.1.4", "3.2", "4.0" ]
exclude:
# Django v4 drops Python 3.7 support
- django-version: 4.0
python-version: 3.7
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
Expand All @@ -53,7 +57,7 @@ jobs:
id: poetry-cache
with:
path: ~/.local
key: key-0
key: key-2
- uses: snok/install-poetry@v1
with:
virtualenvs-create: false
Expand All @@ -62,7 +66,7 @@ jobs:
id: cache-venv
with:
path: .venv
key: ${{ hashFiles('**/poetry.lock') }}-0
key: ${{ hashFiles('**/poetry.lock') }}-3
- run: |
pip install virtualenv
virtualenv .venv
Expand Down
Empty file added django_guid/py.typed
Empty file.
19 changes: 0 additions & 19 deletions mypy.ini

This file was deleted.

110 changes: 27 additions & 83 deletions poetry.lock

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

11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,20 @@ classifiers = [
'Topic :: Software Development :: Libraries :: Python Modules',
]
include = ["CHANGELOG.rst"]
packages = [{ include = 'django_guid' }]

[tool.poetry.urls]
"Release notes" = "https://github.com/snok/django-guid/releases"

[tool.poetry.dependencies]
python = "^3.7"
django = "^3.1.1 | ^4.0"
django = [
{ version = "^3.1.1", python = "<3.8" },
{ version = "^3.1.1 | ^4.0", python = ">=3.8" }
]

[tool.poetry.dev-dependencies]
pre-commit = "^1.21.0"
pre-commit = "^2.9"
sphinx = "^2.4.4"
sphinx_rtd_theme = "^0.4.3"
pytest = "^6.2.5"
Expand Down
23 changes: 21 additions & 2 deletions .flake8 → setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
ignore=
ignore =
# E501: Line length
E501
# Docstring at the top of a public module
Expand Down Expand Up @@ -43,5 +43,24 @@ exclude =
venv,
manage.py


max-complexity = 15

[mypy]
python_version = 3.10
show_error_codes = True
warn_unused_ignores = True
strict_optional = True
incremental = True
ignore_missing_imports = True
warn_redundant_casts = True
warn_unused_configs = True
warn_no_return = False
disallow_untyped_defs = True
disallow_incomplete_defs = True
disallow_untyped_calls = True
local_partial_types = True
show_traceback = True
allow_redefinition = False

[mypy-tests.*]
ignore_errors = True

0 comments on commit d506c30

Please sign in to comment.