Skip to content
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

sourcery-ai[bot]
Copy link
Contributor

@sourcery-ai sourcery-ai bot commented Jan 17, 2024

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:

git fetch origin sourcery/feat(cli)--add-`install`-and-`uninstall`-command
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from HsiangNianian January 17, 2024 04:00
Copy link

vercel bot commented Jan 17, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
iamai-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 17, 2024 4:06am

@sourcery-ai sourcery-ai bot force-pushed the sourcery/feat(cli)--add-`install`-and-`uninstall`-command branch from 73a2a25 to d1b1ff9 Compare January 17, 2024 04:04
@sourcery-ai sourcery-ai bot force-pushed the sourcery/feat(cli)--add-`install`-and-`uninstall`-command branch from d1b1ff9 to f0a91b8 Compare January 17, 2024 04:04
@HsiangNianian HsiangNianian deleted the sourcery/feat(cli)--add-`install`-and-`uninstall`-command branch January 17, 2024 04:04
models = {}
models["hola"] = joblib.load(join(HYDRO_DIR, "models", "hola.pkl"))
return models
return {"hola": joblib.load(join(HYDRO_DIR, "models", "hola.pkl"))}
Copy link
Contributor Author

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:

Comment on lines -62 to -64
elif self.config.handle_group_message:
if self.event.message_type == "guild":
return self.str_match(match_str)
Copy link
Contributor Author

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:

Comment on lines -155 to +157
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}"
)
Copy link
Contributor Author

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:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant