From 97c22e61b8e7a23823abcc04b0b541149d0a21f6 Mon Sep 17 00:00:00 2001 From: Rui Lopes <76881129+RuiL1904@users.noreply.github.com> Date: Fri, 17 Mar 2023 23:08:50 +0000 Subject: [PATCH] Fix pre-commit hook (#33) --- .github/workflows/pre-commit.yml | 6 +++--- .pre-commit-config.yaml | 6 +++--- bot/cogs/daily_report.py | 1 - bot/cogs/help.py | 1 - requirements-dev.txt | 6 +++--- 5 files changed, 9 insertions(+), 11 deletions(-) diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 9035d06..fd7bd40 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -9,6 +9,6 @@ jobs: pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - - uses: pre-commit/action@v2.0.3 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4.5.0 + - uses: pre-commit/action@v3.0.0 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f0b48b9..b4035ff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 + rev: v4.4.0 hooks: - id: check-added-large-files - id: check-ast @@ -27,12 +27,12 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black - rev: 22.3.0 + rev: 23.1.0 hooks: - id: black name: format code with black - repo: https://github.com/pycqa/isort - rev: 5.5.2 + rev: 5.12.0 hooks: - id: isort diff --git a/bot/cogs/daily_report.py b/bot/cogs/daily_report.py index 1a4cd46..bb35484 100644 --- a/bot/cogs/daily_report.py +++ b/bot/cogs/daily_report.py @@ -49,7 +49,6 @@ async def report(self) -> None: current_time = datetime.now() msg = "" if query_log != [] and current_time.hour == 19: - for info in query_log: msg += f"**{info.mentor_id}** atribuiu a **{info.ninja_id}** o cinturão {info.belt_attributed} - {datetime.fromtimestamp(info.timestamp)}\n" diff --git a/bot/cogs/help.py b/bot/cogs/help.py index fe12d7e..dd8ea31 100644 --- a/bot/cogs/help.py +++ b/bot/cogs/help.py @@ -8,7 +8,6 @@ def __init__(self, client: commands.Bot): @commands.command(name="help") async def help(self, ctx: discord.ext.commands.Context) -> None: - # Embed sent by the bot embed = discord.Embed( title="Comandos: [Obrigatório] (alias)", color=0x3489EB diff --git a/requirements-dev.txt b/requirements-dev.txt index 6ffb8ac..5d4916c 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,8 +1,8 @@ -black==22.6.0 +black==23.1.0 ipython==8.4.0 -isort==5.10.1 +isort==5.12.0 mypy==0.971 mypy-extensions==0.4.3 -pre-commit==2.20.0 +pre-commit==3.2.0 pylint==2.14.5 python-dotenv==0.20.0