Skip to content

Commit a5c354d

Browse files
committed
Replace flake8, black, pylint with ruff
For now pylint checks are disabled. Signed-off-by: Povilas Kanapickas <[email protected]>
1 parent e4e5b7d commit a5c354d

File tree

4 files changed

+24
-43
lines changed

4 files changed

+24
-43
lines changed

.github/workflows/pylint.yml

+7-26
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,18 @@ on:
55
- pull_request
66

77
jobs:
8-
lint-black:
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@v3
12-
- name: Install psf/black requirements
13-
run: |
14-
sudo apt-get update
15-
sudo apt-get install -y python3 python3-venv
16-
- uses: psf/black@stable
17-
with:
18-
options: "--check --verbose"
19-
version: "~= 23.3"
20-
21-
lint-pylint:
8+
lint-ruff:
229
runs-on: ubuntu-latest
2310
strategy:
2411
matrix:
25-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
12+
python-version: ["3.11"]
2613
steps:
2714
- uses: actions/checkout@v3
28-
- name: Set up Python ${{ matrix.python-version }}
29-
uses: actions/setup-python@v4
15+
- uses: actions/checkout@v3
16+
name: Set up Python ${{ matrix.python-version }}
3017
with:
3118
python-version: ${{ matrix.python-version }}
32-
- name: Install dependencies
33-
run: |
34-
python -m pip install --upgrade pip
35-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
36-
pip install pylint
37-
- name: Analysing the code with pylint
19+
- name: Analysing the code with ruff
3820
run: |
39-
python -m compileall podman_compose.py
40-
pylint podman_compose.py
41-
# pylint $(git ls-files '*.py')
21+
pip install -r test-requirements.txt
22+
ruff format --check

pyproject.toml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[tool.ruff]
2+
line-length = 100
3+
target-version = "py38"
4+
5+
[tool.ruff.lint]
6+
select = ["W", "E", "F", "I"]
7+
ignore = [
8+
]
9+
10+
[tool.ruff.lint.isort]
11+
force-single-line = true
12+
13+
[tool.ruff.format]
14+
preview = true # needed for quote-style
15+
quote-style = "preserve"

setup.py

+1-9
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,7 @@
3939
"pyyaml",
4040
"python-dotenv",
4141
],
42-
extras_require={
43-
"devel": [
44-
"flake8",
45-
"black",
46-
"pylint",
47-
"pre-commit",
48-
"coverage"
49-
]
50-
}
42+
extras_require={"devel": ["ruff", "pre-commit", "coverage"]},
5143
# test_suite='tests',
5244
# tests_require=[
5345
# 'coverage',

test-requirements.txt

+1-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
coverage==7.4.3
22
pytest==8.0.2
33
tox==4.13.0
4-
black==24.2.0
5-
flake8==7.0.0
4+
ruff==0.3.1
65

76
# The packages below are transitive dependencies of the packages above and are included here
87
# to make testing reproducible.
@@ -13,19 +12,13 @@ flake8==7.0.0
1312

1413
cachetools==5.3.3
1514
chardet==5.2.0
16-
click==8.1.7
1715
colorama==0.4.6
1816
distlib==0.3.8
1917
filelock==3.13.1
2018
iniconfig==2.0.0
21-
mccabe==0.7.0
22-
mypy-extensions==1.0.0
2319
packaging==23.2
24-
pathspec==0.12.1
2520
platformdirs==4.2.0
2621
pluggy==1.4.0
27-
pycodestyle==2.11.1
28-
pyflakes==3.2.0
2922
pyproject-api==1.6.1
3023
python-dotenv==1.0.1
3124
PyYAML==6.0.1

0 commit comments

Comments
 (0)