Skip to content

Commit

Permalink
pre-commit hook
Browse files Browse the repository at this point in the history
  • Loading branch information
howardt12345 committed Aug 4, 2024
1 parent bc2ecd5 commit 5ade34c
Show file tree
Hide file tree
Showing 4 changed files with 161 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
repos:
# Using this mirror lets us use mypyc-compiled black, which is about 2x faster
- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.8.0
hooks:
- id: black
# It is recommended to specify the latest version of Python
# supported by your project here, or alternatively use
# pre-commit's default_language_version, see
# https://pre-commit.com/#top_level-default_language_version
language_version: python3.11
4 changes: 3 additions & 1 deletion main.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,9 @@ async def on_message(message: discord.Message):
pass

# don't respond to bots, bot's own posts or if message reacts are disabled
if message.author == self.client.user or not message_reacts_enabled or message.author.bot:
if (
message.author == self.client.user or not message_reacts_enabled or message.author.bot
):
return

events = []
Expand Down
147 changes: 146 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ pytest = "^8.2.1"
discord-py = "^2.4.0"
pytest-asyncio = "^0.23.7"
black = "^24.8.0"
pre-commit = "^3.8.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
Expand Down

0 comments on commit 5ade34c

Please sign in to comment.