diff --git a/.flake8 b/.flake8 index 5c86e2d..a98c929 100644 --- a/.flake8 +++ b/.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 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 91d002e..85cd03b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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 . diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 13c250a..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1 +0,0 @@ -include py.typed diff --git a/dj_database_url.py b/dj_database_url/__init__.py similarity index 100% rename from dj_database_url.py rename to dj_database_url/__init__.py diff --git a/py.typed b/dj_database_url/py.typed similarity index 100% rename from py.typed rename to dj_database_url/py.typed diff --git a/setup.py b/setup.py index 6ad3673..e967a7c 100644 --- a/setup.py +++ b/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/", diff --git a/tests/__init__.py b/tests/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/test_dj_database_url.py b/tests/test_dj_database_url.py similarity index 100% rename from test_dj_database_url.py rename to tests/test_dj_database_url.py