Skip to content

[Hinty] Type hinting: core - Windows#2163

Closed
gpotter2 wants to merge 3 commits intosecdev:masterfrom
gpotter2:mypy-1
Closed

[Hinty] Type hinting: core - Windows#2163
gpotter2 wants to merge 3 commits intosecdev:masterfrom
gpotter2:mypy-1

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

@gpotter2 gpotter2 added the Hinty label Jul 22, 2019
@gpotter2 gpotter2 changed the title [cool project name] Type hinting: core [cool project name] Type hinting: core - Windows Jul 22, 2019
@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