Skip to content

Fix broken imports and deprecated API usage that caused CI failures#339

Merged
agoscinski merged 3 commits into
mainfrom
fix/broken-imports
Apr 13, 2026
Merged

Fix broken imports and deprecated API usage that caused CI failures#339
agoscinski merged 3 commits into
mainfrom
fix/broken-imports

Conversation

@agoscinski
Copy link
Copy Markdown
Contributor

@agoscinski agoscinski commented Apr 13, 2026

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.

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.
@agoscinski agoscinski changed the base branch from main to master April 13, 2026 11:48
@agoscinski agoscinski changed the base branch from master to main April 13, 2026 11:48
Copy link
Copy Markdown
Contributor

@khsrali khsrali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Comment thread pyproject.toml
'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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this could be actually followed. By a pre-commit. But not a most..

@agoscinski agoscinski merged commit 5a10255 into main Apr 13, 2026
15 checks passed
@agoscinski agoscinski deleted the fix/broken-imports branch April 13, 2026 11:57
Comment thread src/plumpy/workchains.py
cast,
)

import kiwipy
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how come this magically appeared here :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps it's just due to reordering the commits. never mind

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, Isee. it's imported only for typing:
communicator: Optional[kiwipy.Communicator] = None,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plumpy depends on kiwipy in other modules anyways.. So I think this will not add extra overheads.. So it should be fine

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.

2 participants