From fc66515662d9c3330e8757ec2bf917e33b32e8b2 Mon Sep 17 00:00:00 2001 From: Xithrius Date: Sat, 28 Oct 2023 20:00:01 -0700 Subject: [PATCH] Dependabot is back in action, local pre-commit ruff config --- .github/dependabot.yml | 17 +++++++++++++++++ .pre-commit-config.yaml | 24 +++++++++++++++++++----- 2 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..1ab6526 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +version: 2 + +updates: +- package-ecosystem: github-actions + directory: / + schedule: + interval: daily + +- package-ecosystem: pip + directory: api + schedule: + interval: daily + +- package-ecosystem: pip + directory: bot + schedule: + interval: daily diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6508b22..e9eaf69 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,11 +16,6 @@ repos: hooks: - id: python-check-blanket-noqa -- repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.3 - hooks: - - id: ruff - - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 hooks: @@ -42,3 +37,22 @@ repos: - --autofix - --preserve-quotes - --indent=2 + +- repo: local + hooks: + - id: ruff-lint + name: ruff linting + description: Run ruff linting + entry: pdm ruff check + language: system + "types_or": [python, pyi] + require_serial: true + args: [--fix, --exit-non-zero-on-fix] + + - id: ruff-format + name: ruff formatting + description: Run ruff formatting + entry: pdm ruff format + language: system + "types_or": [python, pyi] + require_serial: true