CQCL / hugr

Hierarchical Unified Graph Representation
https://crates.io/crates/hugr
Apache License 2.0
15 stars 4 forks source link

fix(hugr-py): more ruff lints + fix some typos #1246

Closed ss2165 closed 4 days ago

ss2165 commented 4 days ago

import ruff.toml from guppylang

add a config file for typos tool https://github.com/crate-ci/typos?tab=readme-ov-file

coverage is not happy because most of the fixes are in TYPE_CHECKING import blocks or unraised exceptions

codecov[bot] commented 4 days ago

Codecov Report

Attention: Patch coverage is 69.07216% with 30 lines in your changes missing coverage. Please review.

Project coverage is 86.91%. Comparing base (4c6c8cd) to head (5b53d26). Report is 1 commits behind head on main.

:exclamation: Current head 5b53d26 differs from pull request most recent head fb8251a

Please upload reports for the commit fb8251a to get more accurate results.

Files Patch % Lines
hugr-py/src/hugr/cond_loop.py 40.00% 6 Missing :warning:
hugr-py/src/hugr/dfg.py 0.00% 6 Missing :warning:
hugr-py/src/hugr/ops.py 60.00% 4 Missing :warning:
hugr-py/src/hugr/cfg.py 62.50% 3 Missing :warning:
hugr-py/src/hugr/node_port.py 62.50% 3 Missing :warning:
hugr-py/src/hugr/exceptions.py 0.00% 2 Missing :warning:
hugr-py/src/hugr/function.py 50.00% 2 Missing :warning:
hugr-py/src/hugr/hugr.py 75.00% 2 Missing :warning:
hugr-py/src/hugr/serialization/serial_hugr.py 83.33% 1 Missing :warning:
hugr-py/src/hugr/serialization/tys.py 95.65% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1246 +/- ## ========================================== - Coverage 87.00% 86.91% -0.09% ========================================== Files 100 99 -1 Lines 19000 19023 +23 Branches 17015 17015 ========================================== + Hits 16530 16533 +3 - Misses 1693 1713 +20 Partials 777 777 ``` | [Flag](https://app.codecov.io/gh/CQCL/hugr/pull/1246/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CQCL) | Coverage Δ | | |---|---|---| | [python](https://app.codecov.io/gh/CQCL/hugr/pull/1246/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CQCL) | `90.58% <69.07%> (-0.90%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CQCL#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.