You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is that section of the contributing guide outdated?
If so, would you be open to some pull requests to modernise typing? I've noticed that a large part of the codebase uses Python2 type comments, but for Python3+ projects they're discouraged (for examples, PEP 526 states "As variable annotations are more readable than type comments, they are preferred in stub files for all versions of Python, including Python 2.7")
and then some minor manual fixups can get the checks passing. I tried this out in #4650, and it wasn't too much effort, and I verified that tox -e mypy and ./test/run_tests still pass. Would you be interested in modernising type annotations across the codebase?
If there's interest, I'd be happy to do this for the rest of the codebases (for context, I'm part of an effort to improve typing in widely used packages, and there's a lot of interest in Scapy in particular)
The text was updated successfully, but these errors were encountered:
Hi, you're right the guide is outdated.
Regarding an upgrade, we're a bit careful when it comes to large commits that break history.
I think we need to discuss this first with other maintainers to think about what we would prefer.
The contributing guide says that Python2 is supported:
scapy/CONTRIBUTING.md
Lines 140 to 142 in 42115bf
However, pyproject.toml lists Python3.7 as the minimum version:
scapy/pyproject.toml
Lines 30 to 38 in a5dab9e
Is that section of the contributing guide outdated?
If so, would you be open to some pull requests to modernise typing? I've noticed that a large part of the codebase uses Python2 type comments, but for Python3+ projects they're discouraged (for examples, PEP 526 states "As variable annotations are more readable than type comments, they are preferred in stub files for all versions of Python, including Python 2.7")
Some well-tested tools can help with this:
and then some minor manual fixups can get the checks passing. I tried this out in #4650, and it wasn't too much effort, and I verified that
tox -e mypy
and./test/run_tests
still pass. Would you be interested in modernising type annotations across the codebase?If there's interest, I'd be happy to do this for the rest of the codebases (for context, I'm part of an effort to improve typing in widely used packages, and there's a lot of interest in Scapy in particular)
The text was updated successfully, but these errors were encountered: