aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2024-02-21 18:52:39 +0100
committerTrygve Aaberge <trygveaa@gmail.com>2024-02-21 19:05:37 +0100
commit234c169658b44b3d52768dcc5c71f6dcc66b64c7 (patch)
tree3565fb78d3b8799b575b7d614a85422aa2fb5ac6
parent90125ea5ec54431bfafb504def8c4551e3d43fa4 (diff)
downloadwee-slack-234c169658b44b3d52768dcc5c71f6dcc66b64c7.tar.gz
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.
-rw-r--r--.github/workflows/wee-slack.yml2
-rwxr-xr-xgenerate_docs.py1
-rw-r--r--pyproject.toml2
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"]