Skip to content

Commit

Permalink
Update dependencies (#80)
Browse files Browse the repository at this point in the history
* Update dependencies

* Fix ruff import issue

* Fix matplotlib typing errors

* Fix ruff linting errors

* Allow ruff to autofix unsorted imports

* Remove unused `noqa`

* Add documentation to install command to ensure the environment contains only the necessary
  • Loading branch information
CarrotManMatt authored Nov 22, 2023
1 parent 32f4981 commit 3a3ae23
Show file tree
Hide file tree
Showing 4 changed files with 486 additions and 558 deletions.
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Ensure that you have [Poetry](https://python-poetry.org/) installed,
then navigate to the root folder and run the following command:

```shell
poetry install
poetry install --no-root --sync
```

## Setup
Expand All @@ -44,14 +44,10 @@ You'll need to create a Discord bot of your own in the [Discord Developer Portal
It's also handy if you have an empty server (or "guild") for you to test in.

You can retrieve the correct invite URL to use by navigating to the root folder,
then running the following commands in order:
then running the following command:

```shell
poetry shell
```

```shell
python utils.py generate_invite_url {discord_bot_application_id} {discord_guild_id}
poetry run python utils.py generate_invite_url {discord_bot_application_id} {discord_guild_id}
```

You'll also need to set a number of environment variables before running the bot:
Expand Down
2 changes: 1 addition & 1 deletion cogs/remind_me.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ async def autocomplete_get_delays(ctx: TeXBotAutocompleteContext) -> set[str]:
for year in range(current_year, current_year + 40):
delay_choices.add(f"{year}")

elif match := re.match(r"\A(?P<date>\d{1,2}) ?[/\-.] ?(?P<month>\d{1,2}) ?[/\-.] ?(?P<partial_year>\d{1,3})\Z", ctx.value): # noqa: E501, SIM102
elif match := re.match(r"\A(?P<date>\d{1,2}) ?[/\-.] ?(?P<month>\d{1,2}) ?[/\-.] ?(?P<partial_year>\d{1,3})\Z", ctx.value): # noqa: E501
if 1 <= int(match.group("date")) <= 31 and 1 <= int(match.group("month")) <= 12:
for year in range(current_year, current_year + 40):
delay_choices.add(f"{year}"[len(match.group("partial_year")):])
Expand Down
Loading

0 comments on commit 3a3ae23

Please sign in to comment.