Skip to content

Typing fixes in file_handler: avoid cast()#996

Draft
ogenstad wants to merge 1 commit intoinfrahub-developfrom
pog-filehandler-typing
Draft

Typing fixes in file_handler: avoid cast()#996
ogenstad wants to merge 1 commit intoinfrahub-developfrom
pog-filehandler-typing

Conversation

@ogenstad
Copy link
Copy Markdown
Contributor

@ogenstad ogenstad commented May 7, 2026

Why

Improve typing issues in file_handler and remove ty violations.

What changed

  • The potentially weird part to highlight here is the new function _open_binary() everything should work as before the problem was that the return types from anyio hid the actual type.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                Coverage Diff                @@
##           infrahub-develop     #996   +/-   ##
=================================================
  Coverage             81.43%   81.43%           
=================================================
  Files                   134      134           
  Lines                 11359    11362    +3     
  Branches               1703     1703           
=================================================
+ Hits                   9250     9253    +3     
  Misses                 1566     1566           
  Partials                543      543           
Flag Coverage Δ
integration-tests 41.90% <37.50%> (-0.01%) ⬇️
python-3.10 54.39% <62.50%> (-0.03%) ⬇️
python-3.11 54.40% <62.50%> (-0.01%) ⬇️
python-3.12 54.40% <62.50%> (+0.01%) ⬆️
python-3.13 54.40% <62.50%> (-0.01%) ⬇️
python-3.14 54.40% <62.50%> (+0.01%) ⬆️
python-filler-3.12 22.73% <37.50%> (+0.01%) ⬆️

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

Files with missing lines Coverage Δ
infrahub_sdk/file_handler.py 82.06% <100.00%> (+0.37%) ⬆️

... and 1 file with indirect coverage changes

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

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.

1 participant