-
Notifications
You must be signed in to change notification settings - Fork 578
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
Resolve or ignore Ruff and Pylint warnings #1825
Conversation
@@ -518,17 +521,18 @@ def train( | |||
if name == "TrainingOutput": | |||
return TrainingOutputType | |||
|
|||
if name == "Output": | |||
if name == "Output": # pylint: disable=no-else-return |
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.
Worth calling out that the else
is used here to avoid a warning about redefinition of TrainingOutput
.
f"Failed to create cog runtime state directory ({self._root}). " | ||
"Failed to create cog runtime state directory (%s). " | ||
"Does it already exist and is a file? Does the user running cog " | ||
"have permissions?" | ||
"have permissions?", | ||
self._root, |
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.
Flagging this as a nontrivial change.
from requests.packages.urllib3.util.retry import Retry # type: ignore | ||
from urllib3.util.retry import Retry |
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.
…consider-using-with)
…se your program to hang indefinitely (missing-timeout)
…nt the code inside it (no-else-return)
…se your program to hang indefinitely (missing-timeout)
…consider-using-with)
…t the code inside it (no-else-raise)
…lif (no-else-break)
…ttribute-defined-outside-init)
…ot overridden in child class 'ConcatenateIterator' (abstract-method)
…n expression, or none of them should. (inconsistent-return-statements)
…ecified-encoding)
…lif (no-else-raise)
…consider-using-with)
…sed_url.scheme in ('http', 'https')'. Use a set instead if elements are hashable. (consider-using-in)
…elif (no-else-return)
…he code inside it (no-else-return)
…ecified-encoding)
…nt the code inside it (no-else-return)
…ng style (invalid-name)
…ne. (invalid-envvar-default)
…elif (no-else-return)
49b241b
to
9078eb2
Compare
are we using both pylint and ruff now? |
@technillogue Yes. And Pyright, too. Taking a belt and suspenders and chainmail approach, I suppose. |
Ignoring warnings related to
TODO
andFIXME
comments:This is a lot, but I think it would help us to ratchet up code quality ahead of merging async.