Fix broken imports and deprecated API usage that caused CI failures#339
Merged
Conversation
63e0cdf to
5a80618
Compare
Restore missing imports (AttributesFrozendict, type_check, kiwipy, typing members) in ports.py and workchains.py, remove unused imports (abc, six), re-add required __all__ in ports.py, and replace deprecated inspect.getargspec with getfullargspec in lang.py and workchains.py.
- Apply ruff format fixes in state_machine.py and ports.py (string concat, assert style) - Add __hash__ to __NULL class to fix PLW1641 and remove stale noqa: N801 - Ignore N801 and PLC0415 rules in ruff config (internal sentinel class, intentional lazy imports) - Fix mypy attr-defined error by using types.MethodType instead of __get__ in utils.py
The pre-commit hook uses ruff v0.8.0 which formats assert statements differently than the locally installed ruff v0.14.8.
5a80618 to
854960f
Compare
khsrali
reviewed
Apr 13, 2026
| 'RUF005', # Consider iterable unpacking instead of concatenation | ||
| 'RUF012' # Mutable class attributes should be annotated with `typing.ClassVar` | ||
| 'RUF012', # Mutable class attributes should be annotated with `typing.ClassVar` | ||
| 'PLC0415', # `import` should be at the top-level of a file |
Contributor
There was a problem hiding this comment.
maybe this could be actually followed. By a pre-commit. But not a most..
khsrali
reviewed
Apr 13, 2026
| cast, | ||
| ) | ||
|
|
||
| import kiwipy |
Contributor
There was a problem hiding this comment.
how come this magically appeared here :)
Contributor
There was a problem hiding this comment.
perhaps it's just due to reordering the commits. never mind
Contributor
There was a problem hiding this comment.
ok, Isee. it's imported only for typing:
communicator: Optional[kiwipy.Communicator] = None,
Contributor
There was a problem hiding this comment.
Plumpy depends on kiwipy in other modules anyways.. So I think this will not add extra overheads.. So it should be fine
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
These changes have been completely generated from claude code 2.1.92 by prompting to fix the CI fails using Opus 4.6. I only removed claude co-author from the commits.