-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
use isinstance instead of type comparison #26748
Conversation
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all these changes to improve the code!
Mostly just small nits. Only main comment is the modification of the pinned ruff versions.
@@ -20,7 +20,7 @@ | |||
import os | |||
import re | |||
import sys | |||
import time | |||
from time import sleep |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Personal opinion, but I think the previous version was better. Using time.sleep
makes it more obvious which functionality and library is being used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right the issue was that there is a function time
defined in the Message
class which gives a "Redefinition" warning...
src/transformers/models/gptsan_japanese/tokenization_gptsan_japanese.py
Outdated
Show resolved
Hide resolved
…panese.py Co-authored-by: amyeroberts <[email protected]>
@amyeroberts thanks! so I relaxed the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for these improvements to the code!
fixed by #27144 |
What does this PR do?
Fix for E721 errors which are annoying when doing
make style
with a newerruff