Skip to content

Commit

Permalink
Merge pull request #46 from KapJI/fix-mypy
Browse files Browse the repository at this point in the history
Re-enable mypy
  • Loading branch information
simon-weber authored Jul 8, 2022
2 parents 03b9be9 + 040d18b commit 7f364c1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 11 deletions.
10 changes: 5 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ repos:
language: system
types: [python]
require_serial: true
# - id: mypy
# name: mypy
# entry: poetry run mypy
# language: system
# types: [python]
- id: mypy
name: mypy
entry: poetry run mypy
language: system
types: [python]
- id: flake8
name: flake8
entry: poetry run flake8
Expand Down
16 changes: 10 additions & 6 deletions gpsoauth/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
from typing import Any, Iterable

import requests
from urllib3.poolmanager import PoolManager # type: ignore
from urllib3.util import ssl_

# Type annotations for urllib3 will be released with v2.
from urllib3.poolmanager import PoolManager # type: ignore[import]
from urllib3.util import ssl_ # type: ignore[import]

from . import google

Expand Down Expand Up @@ -78,10 +80,12 @@ def _perform_auth_request(
session.mount(AUTH_URL, AuthHTTPAdapter())
if proxies:
session.proxies = proxies
session.headers = {
"User-Agent": USER_AGENT,
"Content-type": "application/x-www-form-urlencoded",
}
session.headers.update(
{
"User-Agent": USER_AGENT,
"Content-type": "application/x-www-form-urlencoded",
}
)

res = session.post(AUTH_URL, data=data, verify=True)

Expand Down
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ extend-ignore = E203, W503

[mypy]
python_version = 3.8
show_error_codes = True
strict = True
disallow_any_unimported = True
show_none_errors = True
Expand Down

0 comments on commit 7f364c1

Please sign in to comment.