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

FIX: updating type hints batch 1 #1968

Closed
wants to merge 27 commits into from

Conversation

hacksysteam
Copy link
Contributor

This PR is the first batch of type hints fixes. It is tough to do everything at once, so I'm sending the pull requests in batches.

Copy link

codecov bot commented Dec 21, 2023

Codecov Report

Attention: 39 lines in your changes are missing coverage. Please review.

Comparison is base (e230a85) 60.51% compared to head (59eef62) 60.69%.
Report is 1 commits behind head on dev.

Files Patch % Lines
pwndbg/lib/funcparser.py 67.64% 11 Missing ⚠️
pwndbg/gdblib/vmmap.py 72.72% 9 Missing ⚠️
pwndbg/commands/__init__.py 88.13% 7 Missing ⚠️
pwndbg/gdblib/elf.py 84.21% 3 Missing ⚠️
pwndbg/auxv.py 81.81% 2 Missing ⚠️
pwndbg/lib/which.py 0.00% 2 Missing ⚠️
gdbinit.py 0.00% 1 Missing ⚠️
pwndbg/commands/cymbol.py 87.50% 1 Missing ⚠️
pwndbg/gdblib/events.py 95.00% 1 Missing ⚠️
pwndbg/lib/android.py 0.00% 1 Missing ⚠️
... and 1 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1968      +/-   ##
==========================================
+ Coverage   60.51%   60.69%   +0.17%     
==========================================
  Files         183      183              
  Lines       22498    22631     +133     
  Branches     2127     2128       +1     
==========================================
+ Hits        13614    13735     +121     
- Misses       8162     8175      +13     
+ Partials      722      721       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

pwndbg/auxv.py Outdated Show resolved Hide resolved
pwndbg/gdblib/arch.py Outdated Show resolved Hide resolved
pwndbg/gdblib/arch.py Outdated Show resolved Hide resolved
pwndbg/gdblib/qemu.py Outdated Show resolved Hide resolved
gdbinit.py Outdated Show resolved Hide resolved
pwndbg/commands/dt.py Outdated Show resolved Hide resolved
pwndbg/gdblib/elf.py Outdated Show resolved Hide resolved
pwndbg/gdblib/strings.py Outdated Show resolved Hide resolved
pwndbg/gdblib/arch.py Outdated Show resolved Hide resolved
pwndbg/gdblib/arch.py Outdated Show resolved Hide resolved
pwndbg/gdblib/regs.py Outdated Show resolved Hide resolved
Removing a redundant self.triggers key setting since its a defaultdict!
Copy link
Member

@disconnect3d disconnect3d left a comment

Choose a reason for hiding this comment

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

I think that lots of these type hints are redundant but its probably also okay to have them.

I just hope that this does not impact the startup performance since this may not be obvious to spot on. I may make some benchmarking of this. On the other hand, the from __future__ import annotations may save us some load time and also type hints for local variables within functions are no-ops.

@disconnect3d
Copy link
Member

Actually, this now fails the linting due to mypy. Can you fix those issues @hacksysteam pointed out by mypy?

@hacksysteam
Copy link
Contributor Author

@disconnect3d in lint.sh I have changed the command to mypy pwndbg || true which will make the CI job to not fail

@disconnect3d
Copy link
Member

disconnect3d commented Dec 28, 2023 via email

lint.sh Outdated Show resolved Hide resolved
@disconnect3d disconnect3d mentioned this pull request Dec 28, 2023
@disconnect3d
Copy link
Member

Closing this in favor of #1970

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants