mirror of
https://github.com/jazzband/dj-database-url.git
synced 2026-03-16 22:20:24 +00:00
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:
parent
bac900f78a
commit
a7f94c8354
8 changed files with 13 additions and 6 deletions
2
.flake8
2
.flake8
|
|
@ -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
|
||||
|
|
|
|||
10
.github/workflows/test.yml
vendored
10
.github/workflows/test.yml
vendored
|
|
@ -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 .
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
include py.typed
|
||||
6
setup.py
6
setup.py
|
|
@ -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
0
tests/__init__.py
Normal file
Loading…
Reference in a new issue