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

Add type checking #69

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add type checking #69

wants to merge 1 commit into from

Conversation

Schamper
Copy link
Member

Closes #68

I've chosen to use pyright because it appears to be the current most advanced type checking tool available for Python. I've set this project to use strict type checking, but other settings are basic and standard. For most other Dissect projects, I think we should just start out with basic and incrementally increase it.

The side-effect of type checking in the lint step are that we now must also install dependencies in order to check types with that.

I've given it my best shot to make dissect.util adhere to the strict ruleset.

Copy link

codecov bot commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 88.48168% with 22 lines in your changes missing coverage. Please review.

Project coverage is 86.26%. Comparing base (27b44fe) to head (3b20fbd).

Files with missing lines Patch % Lines
dissect/util/cpio.py 77.41% 7 Missing ⚠️
dissect/util/tools/dump_nskeyedarchiver.py 0.00% 5 Missing ⚠️
dissect/util/compression/__init__.py 55.55% 4 Missing ⚠️
dissect/util/stream.py 87.09% 4 Missing ⚠️
dissect/util/encoding/surrogateescape.py 0.00% 1 Missing ⚠️
dissect/util/plist.py 98.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #69   +/-   ##
=======================================
  Coverage   86.26%   86.26%           
=======================================
  Files          20       20           
  Lines        1303     1354   +51     
=======================================
+ Hits         1124     1168   +44     
- Misses        179      186    +7     
Flag Coverage Δ
unittests 86.26% <88.48%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

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

Successfully merging this pull request may close these issues.

Add type checking
1 participant