aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam Janovsky2023-02-04 09:15:18 +0100
committerAdam Janovsky2023-02-04 09:15:18 +0100
commit3087b801ef9dbf753dd6230685d138ea1545f1b8 (patch)
tree7071a47ab104223095802cd79c9b73f47ffb17dc
parent3ed9d4dd94c2e4c4de0d874b65da9c33dec90ec1 (diff)
downloadsec-certs-3087b801ef9dbf753dd6230685d138ea1545f1b8.tar.gz
sec-certs-3087b801ef9dbf753dd6230685d138ea1545f1b8.tar.zst
sec-certs-3087b801ef9dbf753dd6230685d138ea1545f1b8.zip
new lint pipeline
-rw-r--r--.github/workflows/new_lint.yml41
-rw-r--r--pyproject.toml11
2 files changed, 46 insertions, 6 deletions
diff --git a/.github/workflows/new_lint.yml b/.github/workflows/new_lint.yml
new file mode 100644
index 00000000..0a1a6ca0
--- /dev/null
+++ b/.github/workflows/new_lint.yml
@@ -0,0 +1,41 @@
+name: Lint (MyPy, Black, Ruff)
+on:
+ push:
+ workflow_dispatch:
+jobs:
+ black:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-python@v4
+ with:
+ python-version: "3.8"
+ - name: Install dependencies
+ run: pip install -r requirements/dev_requirements.txt
+ - name: Run Black
+ run: black
+ with:
+ version: "23.1.0"
+ options: "--check --target-version py38"
+ ruff:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-python@v4
+ with:
+ python-version: "3.8"
+ - name: Install dependencies
+ run: pip install -r requirements/dev_requirements.txt
+ - name: Run Ruff
+ run: ruff --format=github .
+ mypy:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v3
+ - uses: actions/setup-python@v4
+ with:
+ python-version: "3.8"
+ - name: Install dependencies
+ run: pip install -r requirements/dev_requirements.txt
+ - name: Run Mypy
+ run: mypy .
diff --git a/pyproject.toml b/pyproject.toml
index beb1ed33..a7f67db0 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -99,15 +99,12 @@
"F", # pyflakes
"C90", # mccabe
"UP", # pyupgrade
- "PL", # pylint
"PTH", # enforce pathlib usage
"C4", # comprehensions
"SIM",
]
ignore = [
- "E501", # line-length, should be handled by black
- "PLR2004", # magic numbers, what would a project be without them...
- "PLR0913", # too many func arguments
+ "E501", # line-length, should be handled by black
]
src = ["src", "tests"]
line-length = 120
@@ -126,19 +123,21 @@
[tool.black]
line-length = 120
- exclude = '''
+ force-exclude = '''
/(
\.git
| \.mypy_cache
| \.tox
| venv
- | certsvenv
| \.venv
| _build
| buck-out
| build
| dist
| src/sec_certs/_version.py
+ | docs
+ | .ipynb_checkpoints
+ | .eggs
)/
'''