Skip to content

Conversation

francoisfreitag
Copy link
Collaborator

@francoisfreitag francoisfreitag commented Aug 7, 2025

This reverts commit c3a31bb.

Mypy itself crashes on the tip of the branch, and it provides little
value in its current state.

$ mypy tests --no-check-untyped-defs
/home/runner/work/django-phonenumber-field/django-phonenumber-field/.tox/mypy/lib/python3.13/site-packages/django-stubs/contrib/auth/forms.pyi:82: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
If this issue continues with mypy master, please report a bug at https://github.com/python/mypy/issues
version: 1.17.1

#567 was
offered to improve the type checking, but that PR introduces convoluted
workarounds for type checking usage.

We can reconsider when Django officially supports typing or when the
typing ecosystem can be used to better document and verify the code,
without requiring complex workarounds.

https://github.com/stefanfoulis/django-phonenumber-field/pull/567/files#diff-82109bfd2869a9307c952d21292dc118e522d7fb07ca87d1e607ff9b192c666fR51-R60

This reverts commit c3a31bb.

Mypy itself crashes on the tip of the branch, and it provides little
value in its current state.

```
$ mypy tests --no-check-untyped-defs
/home/runner/work/django-phonenumber-field/django-phonenumber-field/.tox/mypy/lib/python3.13/site-packages/django-stubs/contrib/auth/forms.pyi:82: error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
If this issue continues with mypy master, please report a bug at https://github.com/python/mypy/issues
version: 1.17.1
```

stefanfoulis#567 was
offered to improve the type checking, but that PR introduces convoluted
workarounds to runtime code, for type checking usage.

We can reconsider when Django officially supports typing or when the
typing ecosystem can be used to better document and verify the code,
without requiring complex workarounds.

https://github.com/stefanfoulis/django-phonenumber-field/pull/567/files#diff-82109bfd2869a9307c952d21292dc118e522d7fb07ca87d1e607ff9b192c666fR51-R60
@francoisfreitag francoisfreitag merged commit 1f21ce3 into stefanfoulis:main Aug 22, 2025
17 checks passed
@francoisfreitag francoisfreitag deleted the ff/mypy branch August 22, 2025 06:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant