From 234c169658b44b3d52768dcc5c71f6dcc66b64c7 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Wed, 21 Feb 2024 18:52:39 +0100 Subject: Configure ruff files in pyproject.toml and run on most files Move the configuration of which files ruff check should run on from the CI command to pyproject.toml and change it to run on most files. Exclude these files: - typings/weechat.pyi because it's copied from the WeeChat repo and I don't want errors from that. - wee_slack.py and _pytest because it's the old version, so there's no point spending time fixing lint errors there. --- .github/workflows/wee-slack.yml | 2 +- generate_docs.py | 1 + pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wee-slack.yml b/.github/workflows/wee-slack.yml index fb6f3d7..0069dc1 100644 --- a/.github/workflows/wee-slack.yml +++ b/.github/workflows/wee-slack.yml @@ -26,7 +26,7 @@ jobs: - run: poetry run ruff format --check - - run: poetry run ruff check main.py slack tests typings + - run: poetry run ruff check - run: poetry run pyright main.py slack tests typings diff --git a/generate_docs.py b/generate_docs.py index 052c96b..054c341 100755 --- a/generate_docs.py +++ b/generate_docs.py @@ -4,6 +4,7 @@ from __future__ import print_function, unicode_literals from textwrap import dedent + import wee_slack cmds = wee_slack.EventRouter().cmds diff --git a/pyproject.toml b/pyproject.toml index 3c32749..0d3fee3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,7 +47,7 @@ strict = ["**"] reportMissingModuleSource = false [tool.ruff] -extend-exclude = ["typings/weechat.pyi"] +extend-exclude = ["typings/weechat.pyi", "wee_slack.py", "_pytest"] [tool.ruff.lint] extend-select = ["I"] -- cgit