Compare commits
No commits in common. "dev" and "main" have entirely different histories.
16
.github/workflows/tox.yaml
vendored
16
.github/workflows/tox.yaml
vendored
|
@ -23,18 +23,8 @@ jobs:
|
||||||
uses: pdm-project/setup-pdm@v3
|
uses: pdm-project/setup-pdm@v3
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pdm install -d -G lint -G test
|
run: pdm install -d -G lint -G test
|
||||||
- name: Run autoflake check
|
- name: Test with tox
|
||||||
run: pdm run tox -e autoflake
|
run: pdm run tox -e pylint,mypy,bandit
|
||||||
- name: Run isort check
|
|
||||||
run: pdm run tox -e isort
|
|
||||||
- name: Run black check
|
|
||||||
run: pdm run tox -e black
|
|
||||||
- name: Run pylint
|
|
||||||
run: pdm run tox -e pylint
|
|
||||||
- name: Run mypy
|
|
||||||
run: pdm run tox -e mypy
|
|
||||||
- name: Run bandit
|
|
||||||
run: pdm run tox -e bandit
|
|
||||||
|
|
||||||
unit-tests:
|
unit-tests:
|
||||||
name: Unit tests
|
name: Unit tests
|
||||||
|
@ -51,5 +41,5 @@ jobs:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: pdm install -d -G test
|
run: pdm install -d -G test
|
||||||
- name: Run unit tests
|
- name: Test with tox
|
||||||
run: pdm run tox
|
run: pdm run tox
|
||||||
|
|
|
@ -7,10 +7,6 @@ repos:
|
||||||
- id: check-toml
|
- id: check-toml
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- repo: https://github.com/PyCQA/autoflake
|
|
||||||
rev: v2.2.0
|
|
||||||
hooks:
|
|
||||||
- id: autoflake
|
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 23.7.0
|
rev: 23.7.0
|
||||||
hooks:
|
hooks:
|
||||||
|
|
|
@ -35,12 +35,8 @@ lint = [
|
||||||
"mypy>=1.5.1",
|
"mypy>=1.5.1",
|
||||||
"bandit[toml]>=1.7.5",
|
"bandit[toml]>=1.7.5",
|
||||||
"tox-pdm>=0.6.1",
|
"tox-pdm>=0.6.1",
|
||||||
"autoflake>=2.2.0",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.isort]
|
|
||||||
profile = "black"
|
|
||||||
|
|
||||||
[tool.pylint.main]
|
[tool.pylint.main]
|
||||||
ignore-patterns = ["^\\.#"]
|
ignore-patterns = ["^\\.#"]
|
||||||
|
|
||||||
|
@ -56,9 +52,3 @@ ignored-argument-names = "_.*|^ignored_|^unused_"
|
||||||
|
|
||||||
[tool.bandit]
|
[tool.bandit]
|
||||||
exclude_dirs = ["tests", ".tox", ".venv"]
|
exclude_dirs = ["tests", ".tox", ".venv"]
|
||||||
|
|
||||||
[tool.autoflake]
|
|
||||||
recursive = true
|
|
||||||
remove-all-unused-imports=true
|
|
||||||
remove-duplicate-keys = true
|
|
||||||
remove-unused-variables = true
|
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import re
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from typing import Any, Union
|
from typing import Any, Union
|
||||||
|
|
||||||
|
|
28
tox.ini
28
tox.ini
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = autoflake, isort, black, pylint, mypy, bandit, py{39,310,311,py39}
|
envlist = pylint, mypy, bandit, py{39,310,311,py39}
|
||||||
isolated_build = True
|
isolated_build = True
|
||||||
|
|
||||||
[gh-actions]
|
[gh-actions]
|
||||||
|
@ -14,24 +14,6 @@ groups =
|
||||||
commands =
|
commands =
|
||||||
pytest --cov-report term-missing --cov-fail-under=100 --cov=operator_repo -v tests/
|
pytest --cov-report term-missing --cov-fail-under=100 --cov=operator_repo -v tests/
|
||||||
|
|
||||||
[testenv:autoflake]
|
|
||||||
groups =
|
|
||||||
lint
|
|
||||||
commands =
|
|
||||||
autoflake --check src tests
|
|
||||||
|
|
||||||
[testenv:isort]
|
|
||||||
groups =
|
|
||||||
lint
|
|
||||||
commands =
|
|
||||||
isort --check src tests
|
|
||||||
|
|
||||||
[testenv:black]
|
|
||||||
groups =
|
|
||||||
lint
|
|
||||||
commands =
|
|
||||||
black --check src tests
|
|
||||||
|
|
||||||
[testenv:pylint]
|
[testenv:pylint]
|
||||||
groups =
|
groups =
|
||||||
lint
|
lint
|
||||||
|
@ -50,11 +32,3 @@ groups =
|
||||||
lint
|
lint
|
||||||
commands =
|
commands =
|
||||||
bandit -c pyproject.toml -r .
|
bandit -c pyproject.toml -r .
|
||||||
|
|
||||||
[testenv:format]
|
|
||||||
groups =
|
|
||||||
lint
|
|
||||||
commands =
|
|
||||||
autoflake --in-place src tests
|
|
||||||
isort src tests
|
|
||||||
black src tests
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user