From d69d7705b10e21fb3967389b3eb6e6445154ff81 Mon Sep 17 00:00:00 2001 From: Frank Hamand Date: Wed, 22 Feb 2023 11:46:12 +0000 Subject: [PATCH] Update mypy to 0.981 for 3.10.7 compatibility Needed this bug to be fixed: https://github.com/python/mypy/issues/13627 This also incidentally fixed the mypy bug in csv_exporter.py --- posthog/tasks/exports/csv_exporter.py | 3 +-- requirements-dev.in | 2 +- requirements-dev.txt | 13 +++---------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/posthog/tasks/exports/csv_exporter.py b/posthog/tasks/exports/csv_exporter.py index a9b75b6469529..b8358af9ff3bf 100644 --- a/posthog/tasks/exports/csv_exporter.py +++ b/posthog/tasks/exports/csv_exporter.py @@ -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) diff --git a/requirements-dev.in b/requirements-dev.in index d3096ba4daaec..299ffe4a2a2cc 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -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 diff --git a/requirements-dev.txt b/requirements-dev.txt index 79eb2b73e4a10..8c4b59f4167f7 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -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 @@ -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 @@ -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 @@ -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 @@ -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