Redo as a package to fix mypy issues (#215)

* Demo the mypy types issue

* Redo as a package

* Update setup.py

---------

Co-authored-by: Matt Seymour <mattaseymour@gmail.com>
This commit is contained in:
Tom Parker-Shemilt 2023-04-13 10:59:57 +01:00 committed by GitHub
parent bac900f78a
commit a7f94c8354
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 13 additions and 6 deletions

View file

@ -2,4 +2,4 @@
max-line-length = 88
extend-ignore = E203
per-file-ignores=
test_dj_database_url.py: E501, E265
tests/test_dj_database_url.py: E501, E265

View file

@ -37,13 +37,19 @@ jobs:
- name: Run mypy
run: |
python -m mypy dj_database_url.py
python -m mypy dj_database_url
- name: Run Tests
run: |
echo "$(python --version) / Django $(django-admin --version)"
coverage run --source=dj_database_url --branch -m unittest discover
coverage run --source=dj_database_url --branch -m unittest discover -v
coverage report
coverage xml
- uses: codecov/codecov-action@v3
- name: Check mypy types installation
run: |
pip install .
cd tests
python -m mypy .

View file

@ -1 +0,0 @@
include py.typed

View file

@ -13,10 +13,12 @@ setup(
description="Use Database URLs in your Django Application.",
long_description=readme,
long_description_content_type="text/x-rst",
py_modules=["dj_database_url"],
packages=["dj_database_url"],
install_requires=["Django>=3.2", "typing_extensions >= 3.10.0.0"],
zip_safe=False,
include_package_data=True,
package_data={
"dj_database_url": ["py.typed"],
},
platforms="any",
project_urls={
"GitHub": "https://github.com/jazzband/dj-database-url/",

0
tests/__init__.py Normal file
View file