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

[Hinty] Type hinting: core - Windows #2163

Closed
wants to merge 3 commits into from
Closed

Conversation

gpotter2
Copy link
Member

@gpotter2 gpotter2 commented Jul 22, 2019

Note: after some experiments, Mypy will require so many changes that the files should be done one by one

Requires ##2162

This PR:

  • adds type hinting for Scapy's core.
  • adds type hinting for arch/

This was automatically generated, then reviewed manually. I may have missed some big mistakes, please review carefully. Note that the automatic detector tends to use specific Packet classes rather than the general "Packet" class.

Reviewers: it's a good idea to use the new "File viewed" feature 😄

Copy link
Member Author

@gpotter2 gpotter2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A first example of what the review should look like

scapy/arch/__init__.py Outdated Show resolved Hide resolved
scapy/arch/common.py Outdated Show resolved Hide resolved
scapy/arch/pcapdnet.py Show resolved Hide resolved
scapy/arch/pcapdnet.py Show resolved Hide resolved
@gpotter2 gpotter2 added the Hinty label Jul 22, 2019
@gpotter2 gpotter2 force-pushed the mypy-1 branch 2 times, most recently from 53bb338 to c6ab89e Compare July 22, 2019 19:12
scapy/ansmachine.py Outdated Show resolved Hide resolved
scapy/ansmachine.py Outdated Show resolved Hide resolved
@gpotter2 gpotter2 force-pushed the mypy-1 branch 2 times, most recently from cf79d88 to f5dcf58 Compare July 22, 2019 22:26
@gpotter2 gpotter2 changed the title [cool project name] Type hinting: core [cool project name] Type hinting: core - Windows Jul 22, 2019
@gpotter2 gpotter2 force-pushed the mypy-1 branch 3 times, most recently from 1c88a3e to 3e11702 Compare July 22, 2019 22:39
@gpotter2 gpotter2 changed the title [cool project name] Type hinting: core - Windows [Hinty] Type hinting: core - Windows Jul 23, 2019
@gpotter2 gpotter2 closed this Jul 23, 2019
@gpotter2 gpotter2 reopened this Jul 23, 2019
@codecov
Copy link

codecov bot commented Jul 23, 2019

Codecov Report

Merging #2163 into master will decrease coverage by 0.61%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2163      +/-   ##
==========================================
- Coverage   87.34%   86.73%   -0.62%     
==========================================
  Files         200      199       -1     
  Lines       45451    45455       +4     
==========================================
- Hits        39699    39424     -275     
- Misses       5752     6031     +279
Impacted Files Coverage Δ
scapy/asn1packet.py 94.73% <ø> (ø) ⬆️
scapy/arch/__init__.py 84.44% <ø> (-11.12%) ⬇️
scapy/__init__.py 83.72% <ø> (ø) ⬆️
scapy/extlib.py 85.29% <ø> (ø) ⬆️
scapy/data.py 90.68% <100%> (-0.15%) ⬇️
scapy/utils6.py 86.9% <100%> (-0.31%) ⬇️
scapy/pipetool.py 90.1% <100%> (+0.12%) ⬆️
scapy/plist.py 87.14% <100%> (+0.26%) ⬆️
scapy/themes.py 81.18% <100%> (+0.26%) ⬆️
scapy/pton_ntop.py 97.29% <100%> (+8.25%) ⬆️
... and 50 more

@gpotter2
Copy link
Member Author

gpotter2 commented Jul 23, 2019

Yeah this PR is ridiculous

@gpotter2 gpotter2 closed this Jul 23, 2019
@gpotter2 gpotter2 deleted the mypy-1 branch October 9, 2020 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant