Skip to content

Lighter MyPy rules for layers #2957

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

Merged
merged 1 commit into from
Nov 16, 2020
Merged

Lighter MyPy rules for layers #2957

merged 1 commit into from
Nov 16, 2020

Conversation

gpotter2
Copy link
Member

I'm trying to find a good typing compromise.

For layers or contribs files, because the type of Packet fields are unknown (doing src = IP().src is typed "Any"), we are going to need lighter rules if we don't want the entire codebase to become a mess of cast() calls.

This is a first step towards this balance. I might tweak it more later

@gpotter2 gpotter2 mentioned this pull request Nov 15, 2020
5 tasks
@gpotter2 gpotter2 added the Hinty label Nov 15, 2020
@codecov
Copy link

codecov bot commented Nov 15, 2020

Codecov Report

Merging #2957 (bbaccc8) into master (bdae3e3) will increase coverage by 0.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #2957      +/-   ##
==========================================
+ Coverage   87.91%   87.93%   +0.01%     
==========================================
  Files         255      255              
  Lines       54617    54617              
==========================================
+ Hits        48019    48025       +6     
+ Misses       6598     6592       -6     
Impacted Files Coverage Δ
scapy/arch/windows/__init__.py 68.63% <0.00%> (-0.20%) ⬇️
scapy/arch/bpf/core.py 87.59% <0.00%> (+0.77%) ⬆️
scapy/layers/tls/session.py 84.79% <0.00%> (+1.01%) ⬆️

@p-l- p-l- merged commit 184d3c6 into secdev:master Nov 16, 2020
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.

2 participants