-
Notifications
You must be signed in to change notification settings - Fork 190
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
Fix to unify type comparison methods #311
Conversation
@daikikatsuragawa Thanks for the PR. Could you add a flake8 rule to test for the above as per https://www.flake8rules.com/rules/E721.html? It will be useful for future that we don't add class checks with |
Thank you. I will add it. Also, I will fix the failing CI. |
Signed-off-by: Daiki Katsuragawa <50144563+daikikatsuragawa@users.noreply.github.com>
Signed-off-by: Daiki Katsuragawa <50144563+daikikatsuragawa@users.noreply.github.com>
Signed-off-by: Daiki Katsuragawa <50144563+daikikatsuragawa@users.noreply.github.com>
This one has been corrected. |
I was considering adding the following. DiCE/.github/workflows/python-linting.yml Line 32 in ea6f484
I tried the following locally, added the error code, and verified that it did not seem to be working properly. $ flake8 . --count --select=E721,E9,F63,F7,F82 --show-source --statistics What is it, do you know? 🤔 |
Ah, do you mean that the flake8 still passes when |
Yes, that's right. |
This is a modification to unify the type comparison method.
Previously, there were two methods
if type(ABC) is str:
if isinstance(ABC, str):
This fix is related to coding and does not affect services. However, this unification is expected to increase code maintainability during development.