-
Notifications
You must be signed in to change notification settings - Fork 9
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
Feat(cli) add install
and uninstall
command (Sourcery refactored)
#261
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
73a2a25
to
d1b1ff9
Compare
d1b1ff9
to
f0a91b8
Compare
models = {} | ||
models["hola"] = joblib.load(join(HYDRO_DIR, "models", "hola.pkl")) | ||
return models | ||
return {"hola": joblib.load(join(HYDRO_DIR, "models", "hola.pkl"))} |
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.
Function _load_models
refactored with the following changes:
- Merge dictionary assignment with declaration (
merge-dict-assign
) - Inline variable that is immediately returned (
inline-immediately-returned-variable
)
elif self.config.handle_group_message: | ||
if self.event.message_type == "guild": | ||
return self.str_match(match_str) |
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.
Function rule
refactored with the following changes:
- Remove redundant conditional (
remove-redundant-if
)
else: | ||
if len(rolls) > int(threshold): | ||
return str(total) | ||
rolls_str = " + ".join(str(r) for r in rolls) | ||
result_str = ( | ||
f"{total} = {rolls_str}" if is_reversed else f"{rolls_str} = {total}" | ||
) | ||
return result_str | ||
if len(rolls) > int(threshold): | ||
return str(total) | ||
rolls_str = " + ".join(str(r) for r in rolls) | ||
return ( | ||
f"{total} = {rolls_str}" if is_reversed else f"{rolls_str} = {total}" | ||
) |
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.
Function HydroDice.roll_dice
refactored with the following changes:
- Remove unnecessary else after guard condition (
remove-unnecessary-else
) - Inline variable that is immediately returned (
inline-immediately-returned-variable
)
Pull Request #260 refactored by Sourcery.
If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.
NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.
See our documentation here.
Run Sourcery locally
Reduce the feedback loop during development by using the Sourcery editor plugin:
Review changes via command line
To manually merge these changes, make sure you're on the
feat(cli)--add-`install`-and-`uninstall`-command
branch, then run:Help us improve this pull request!