Skip to content

Replace to isinstance#2637

Draft
Spiritedswordsman wants to merge 26 commits intocerttools:developfrom
Spiritedswordsman:replace_to_isinstance
Draft

Replace to isinstance#2637
Spiritedswordsman wants to merge 26 commits intocerttools:developfrom
Spiritedswordsman:replace_to_isinstance

Conversation

@Spiritedswordsman
Copy link

This PR brings updates to various files as mentioned in the issue #2636 where type() is replaced by isinstance()

Closes #2636

Copy link
Member

@sebix sebix left a comment

Choose a reason for hiding this comment

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

Looked at a few files and found various sloppiness errors.
That also indicates that you didn't even try to run the tests.

Please review once again.

Copy link
Member

@sebix sebix left a comment

Choose a reason for hiding this comment

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

Slightly better, but you still missed two in the list:

  • intelmq/lib/test.py: elif issubclass(type(msg), message.Message):
  • intelmq/lib/message.py: if dict_eq and issubclass(type(other), Message):

@sebix
Copy link
Member

sebix commented Aug 16, 2025

Have a look at the failing tests.

@sebix sebix marked this pull request as draft January 15, 2026 07:35
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.

Replace type() by isinstance()

2 participants