Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linting Error check.py #43

Open
dougransom opened this issue Dec 26, 2024 · 0 comments
Open

Linting Error check.py #43

dougransom opened this issue Dec 26, 2024 · 0 comments

Comments

@dougransom
Copy link

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`

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

No branches or pull requests

1 participant