Skip to content

Commit

Permalink
Update mypy to 0.981 for 3.10.7 compatibility
Browse files Browse the repository at this point in the history
Needed this bug to be fixed: python/mypy#13627

This also incidentally fixed the mypy bug in csv_exporter.py
  • Loading branch information
frankh committed Feb 22, 2023
1 parent 12f110f commit d69d770
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
3 changes: 1 addition & 2 deletions posthog/tasks/exports/csv_exporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ def add_query_params(url: str, params: Dict[str, str]) -> str:
for key, value in params.items():
update_params.append((key, value))

# mypy bug ? https://github.com/python/typeshed/issues/4234
encodedQueryParams = urlencode(update_params, quote_via=quote) # type: ignore
encodedQueryParams = urlencode(update_params, quote_via=quote)
parsed = parsed._replace(query=encodedQueryParams)
return urlunparse(parsed)

Expand Down
2 changes: 1 addition & 1 deletion requirements-dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ flake8-import-order==0.18.1
flake8-logging-format==0.7.5
flake8-print==5.0.0
pip-tools==6.6.2
mypy==0.931
mypy==0.981
mypy-extensions==0.4.3
datamodel-code-generator==0.16.1
djangorestframework-stubs==1.4.0
Expand Down
13 changes: 3 additions & 10 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with python 3.9
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
#
# pip-compile requirements-dev.in
Expand Down Expand Up @@ -123,9 +123,7 @@ idna==2.8
# requests
# urllib3
importlib-resources==5.10.2
# via
# -c requirements.txt
# openapi-spec-validator
# via openapi-spec-validator
inflect==5.6.2
# via datamodel-code-generator
iniconfig==1.1.1
Expand Down Expand Up @@ -154,7 +152,7 @@ markupsafe==1.1.1
# via jinja2
mccabe==0.7.0
# via flake8
mypy==0.931
mypy==0.981
# via
# -r requirements-dev.in
# django-stubs
Expand Down Expand Up @@ -327,7 +325,6 @@ types-requests==2.26.1
typing-extensions==4.4.0
# via
# -c requirements.txt
# black
# django-stubs
# djangorestframework-stubs
# jsonschema-spec
Expand All @@ -353,10 +350,6 @@ wrapt==1.14.1
# via
# -c requirements.txt
# deprecated
zipp==3.1.0
# via
# -c requirements.txt
# importlib-resources

# The following packages are considered to be unsafe in a requirements file:
# pip
Expand Down

0 comments on commit d69d770

Please sign in to comment.