Skip to content

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.

@codecov
Copy link

codecov bot commented Jan 20, 2025

Codecov Report

❌ 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).
⚠️ Report is 19 commits behind head on main.

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq
Copy link

codspeed-hq bot commented Dec 17, 2025

Merging this PR will improve performance by 15.17%

⚡ 1 improved benchmark
✅ 27 untouched benchmarks

Performance Changes

Benchmark BASE HEAD Efficiency
test_benchmark_large_lz4_decompress[python] 203 µs 176.3 µs +15.17%

Comparing typing (79046f9) with main (ab5e6d1)

Open in CodSpeed

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

2 participants