From 23f6da239990248be088437a3311484099773960 Mon Sep 17 00:00:00 2001 From: No767 <73260931+No767@users.noreply.github.com> Date: Fri, 3 Nov 2023 13:34:52 -0700 Subject: [PATCH] Include ruff for pre commits --- .pre-commit-config.yaml | 7 +++++++ bot/cogs/dev_tools.py | 1 - bot/libs/utils/tree.py | 2 -- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d728390..590ad21 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,6 +28,13 @@ repos: name: AutoFlake description: "Format with AutoFlake" stages: [commit] + +- repo: https://github.com/astral-sh/ruff-pre-commit + rev: v0.1.3 + hooks: + - id: ruff + name: Ruff + args: ["--fix", "--exit-non-zero-on-fix", "--config", "pyproject.toml"] - repo: https://github.com/PyCQA/isort rev: 5.12.0 diff --git a/bot/cogs/dev_tools.py b/bot/cogs/dev_tools.py index 22b1bda..a754c27 100644 --- a/bot/cogs/dev_tools.py +++ b/bot/cogs/dev_tools.py @@ -2,7 +2,6 @@ import discord from cogs import EXTENSIONS -from discord import app_commands from discord.ext import commands from discord.ext.commands import Context, Greedy diff --git a/bot/libs/utils/tree.py b/bot/libs/utils/tree.py index 8f0b0dd..32e5ce2 100644 --- a/bot/libs/utils/tree.py +++ b/bot/libs/utils/tree.py @@ -1,7 +1,5 @@ import discord from discord import app_commands -from discord.utils import utcnow -from libs.utils import ErrorEmbed from .errors import produce_error_embed