Skip to content

Purge or address pylints#282

Merged
james-d-mitchell merged 4 commits into
libsemigroups:v1from
Joseph-Edwards:unused-imports
Jun 19, 2025
Merged

Purge or address pylints#282
james-d-mitchell merged 4 commits into
libsemigroups:v1from
Joseph-Edwards:unused-imports

Conversation

@Joseph-Edwards

Copy link
Copy Markdown
Collaborator

This PR removes many unnecessary pylint warnings and, where possible, fixes some warnings we were previously disabling.

@@ -20,11 +20,9 @@
from typing_extensions import Self

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm not sure about these changes, this is a bit misleading, and looks weird. I think maybe what we want is type(Undefined).

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Ah I see. I was a bit confused as to why UNDEFINED was being used here. So we want this to point to pybind11_builtins.pybind11_type?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes exactly although I'm not sure how to get hold of that "correctly"

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

I've updated this following from our discussion yesterday, with a comment about why we have done what we've done. An additional step would be to add runtime checks like isinstance(cxx_type, type(Undefined)) if we really care about type correctness in these functions.

@james-d-mitchell james-d-mitchell merged commit 5221b2c into libsemigroups:v1 Jun 19, 2025
13 checks passed
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