diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 08de1fd..5a7e72e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -1,5 +1,3 @@ -name: Publish - on: release: types: [ created ] diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 26a4af6..8e5bf93 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,5 +1,3 @@ -name: Test - on: push: branches: @@ -21,4 +19,5 @@ jobs: python-version: ${{ matrix.python-version }} - run: pip install -r requirements/dev.txt - run: flake8 . + - run: mypy . - run: pytest diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 0000000..9e3e70d --- /dev/null +++ b/mypy.ini @@ -0,0 +1,5 @@ +[mypy] +strict = true +disable_error_code = type-arg +ignore_missing_imports = true +explicit_package_bases = true diff --git a/requirements/dev.txt b/requirements/dev.txt index be1d6f0..d4405fc 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -8,3 +8,4 @@ flake8-commas flake8-quotes pytest pytest-cov +mypy diff --git a/zimran/django/middleware/http_host_rename.py b/zimran/django/middleware/http_host_rename.py index 4c31d5a..cb0ac1f 100644 --- a/zimran/django/middleware/http_host_rename.py +++ b/zimran/django/middleware/http_host_rename.py @@ -7,7 +7,7 @@ class HttpHostRenameMiddleware: def __init__(self, get_response: Callable) -> None: self.get_response = get_response - def __call__(self, request: HttpRequest): + def __call__(self, request: HttpRequest): # type: ignore[no-untyped-def] self.rename_http_host(request) return self.get_response(request)