mirror of
https://github.com/containers/podman-compose.git
synced 2024-11-21 23:43:24 +01:00
Replace flake8, black, pylint with ruff
For now pylint checks are disabled. Signed-off-by: Povilas Kanapickas <povilas@radix.lt>
This commit is contained in:
parent
e4e5b7d461
commit
a5c354d60b
33
.github/workflows/pylint.yml
vendored
33
.github/workflows/pylint.yml
vendored
@ -5,37 +5,18 @@ on:
|
||||
- pull_request
|
||||
|
||||
jobs:
|
||||
lint-black:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install psf/black requirements
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python3 python3-venv
|
||||
- uses: psf/black@stable
|
||||
with:
|
||||
options: "--check --verbose"
|
||||
version: "~= 23.3"
|
||||
|
||||
lint-pylint:
|
||||
lint-ruff:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
|
||||
python-version: ["3.11"]
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
- uses: actions/checkout@v3
|
||||
name: Set up Python ${{ matrix.python-version }}
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Install dependencies
|
||||
- name: Analysing the code with ruff
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
pip install pylint
|
||||
- name: Analysing the code with pylint
|
||||
run: |
|
||||
python -m compileall podman_compose.py
|
||||
pylint podman_compose.py
|
||||
# pylint $(git ls-files '*.py')
|
||||
pip install -r test-requirements.txt
|
||||
ruff format --check
|
||||
|
15
pyproject.toml
Normal file
15
pyproject.toml
Normal file
@ -0,0 +1,15 @@
|
||||
[tool.ruff]
|
||||
line-length = 100
|
||||
target-version = "py38"
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = ["W", "E", "F", "I"]
|
||||
ignore = [
|
||||
]
|
||||
|
||||
[tool.ruff.lint.isort]
|
||||
force-single-line = true
|
||||
|
||||
[tool.ruff.format]
|
||||
preview = true # needed for quote-style
|
||||
quote-style = "preserve"
|
10
setup.py
10
setup.py
@ -39,15 +39,7 @@ setup(
|
||||
"pyyaml",
|
||||
"python-dotenv",
|
||||
],
|
||||
extras_require={
|
||||
"devel": [
|
||||
"flake8",
|
||||
"black",
|
||||
"pylint",
|
||||
"pre-commit",
|
||||
"coverage"
|
||||
]
|
||||
}
|
||||
extras_require={"devel": ["ruff", "pre-commit", "coverage"]},
|
||||
# test_suite='tests',
|
||||
# tests_require=[
|
||||
# 'coverage',
|
||||
|
@ -1,8 +1,7 @@
|
||||
coverage==7.4.3
|
||||
pytest==8.0.2
|
||||
tox==4.13.0
|
||||
black==24.2.0
|
||||
flake8==7.0.0
|
||||
ruff==0.3.1
|
||||
|
||||
# The packages below are transitive dependencies of the packages above and are included here
|
||||
# to make testing reproducible.
|
||||
@ -13,19 +12,13 @@ flake8==7.0.0
|
||||
|
||||
cachetools==5.3.3
|
||||
chardet==5.2.0
|
||||
click==8.1.7
|
||||
colorama==0.4.6
|
||||
distlib==0.3.8
|
||||
filelock==3.13.1
|
||||
iniconfig==2.0.0
|
||||
mccabe==0.7.0
|
||||
mypy-extensions==1.0.0
|
||||
packaging==23.2
|
||||
pathspec==0.12.1
|
||||
platformdirs==4.2.0
|
||||
pluggy==1.4.0
|
||||
pycodestyle==2.11.1
|
||||
pyflakes==3.2.0
|
||||
pyproject-api==1.6.1
|
||||
python-dotenv==1.0.1
|
||||
PyYAML==6.0.1
|
||||
|
Loading…
Reference in New Issue
Block a user