-
Notifications
You must be signed in to change notification settings - Fork 4.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
Fix ModelManager.list_models() #3128
Conversation
Addressed the following: TTS/utils/manage.py:307:12: R1705: Unnecessary "else" after "return" (no-else-return) TTS/utils/manage.py:308:21: W1514: Using open without explicitly specifying an encoding (unspecified-encoding) TTS/utils/manage.py:299:4: R1710: Either all return statements in a function should return an expression, or none of them should. (inconsistent-return-statements) TTS/utils/manage.py:299:4: R0201: Method could be a function (no-self-use) TTS/utils/manage.py:314:4: R0201: Method could be a function (no-self-use)
"""Ask the user to agree to the terms of service""" | ||
tos_path = os.path.join(model_full_path, "tos_agreed.txt") | ||
if not os.path.exists(tos_path): |
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.
🤔 This whole if
is gone?
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.
The same condition is already checked in tos_agreed()
, so no need to repeat it here (and if it were kept, a return True
would be necessary after the if
block actually).
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.
Ah, I see. (Also, it seems this wouldn't have taken the COQUI_TOS_AGREED
envvar into account...)
yeah, linting is too much for ML projects. |
This removes the hard-coded
model_type
variable, so that the following now returns all models, not onlytts_models
:The second commit addresses the output of
make lint
for that file.