Skip to content

Commit

Permalink
use mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
kuanysh-beisembayev committed Apr 6, 2023
1 parent 6898bdb commit 2f1c621
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
name: Publish

on:
release:
types: [ created ]
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
name: Test

on:
push:
branches:
Expand All @@ -21,4 +19,5 @@ jobs:
python-version: ${{ matrix.python-version }}
- run: pip install -r requirements/dev.txt
- run: flake8 .
- run: mypy .
- run: pytest
5 changes: 5 additions & 0 deletions mypy.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[mypy]
strict = true
disable_error_code = type-arg
ignore_missing_imports = true
explicit_package_bases = true
1 change: 1 addition & 0 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ flake8-commas
flake8-quotes
pytest
pytest-cov
mypy
2 changes: 1 addition & 1 deletion zimran/django/middleware/http_host_rename.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 2f1c621

Please sign in to comment.