Skip to content

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.

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