Skip to content

Linting Error check.py #43

@dougransom

Description

@dougransom

What should be done about this? disable the error?

py313: commands[0]> pycodestyle --show-source --show-pep8 experta experta\matchers\rete\check.py:31:15: E721 do not compare types, for exact checks use is/is not, for instance checks use isinstance()res = type(fact) == self.fact_type ^ Object type comparisons shouldis/is not/isinstance()`.

Do not compare types directly.

Okay: if isinstance(obj, int):
Okay: if type(obj) is int:
E721: if type(obj) == type(1):
py313: exit 1 (0.23 seconds) C:\Users\doug\code\experta> pycodestyle --show-source --show-pep8 experta pid=17296
py313: FAIL ✖ in 1.68 seconds`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions