Skip to content

[WIP] [Hinty] Type hinting: layers#2164

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

[WIP] [Hinty] Type hinting: layers#2164
gpotter2 wants to merge 3 commits intosecdev:masterfrom
gpotter2:mypy-2

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 layers

This was automatically generated, then reviewed manually. (STILL TODO) 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 😄

@gpotter2 gpotter2 added the Hinty label Jul 22, 2019
@codecov
Copy link

codecov bot commented Jul 22, 2019

Codecov Report

Merging #2164 into master will decrease coverage by 37.34%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master   #2164       +/-   ##
==========================================
- Coverage   87.34%     50%   -37.35%     
==========================================
  Files         200       5      -195     
  Lines       45451     128    -45323     
==========================================
- Hits        39699      64    -39635     
+ Misses       5752      64     -5688
Impacted Files Coverage Δ
scapy/__init__.py 55.81% <ø> (-27.91%) ⬇️
scapy/compat.py 35.59% <0%> (-64.41%) ⬇️
scapy/consts.py 70.83% <0%> (-20.84%) ⬇️
scapy/contrib/ripng.py
scapy/arch/bpf/consts.py
scapy/contrib/spbm.py
scapy/plist.py
scapy/themes.py
scapy/layers/clns.py
... and 133 more

@gpotter2 gpotter2 changed the title [cool project name] Type hinting: layers [WIP] [cool project name] Type hinting: layers Jul 22, 2019
@gpotter2 gpotter2 changed the title [WIP] [cool project name] Type hinting: layers [WIP] [Hinty] Type hinting: layers Jul 23, 2019
@gpotter2 gpotter2 closed this Jul 23, 2019
@gpotter2 gpotter2 deleted the mypy-2 branch July 19, 2020 09:20
@gpotter2 gpotter2 restored the mypy-2 branch July 19, 2020 09:20
@gpotter2 gpotter2 deleted the mypy-2 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