Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable mypy #46

Merged
merged 1 commit into from
Jul 8, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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