Skip to content

Commit 29b44be

Browse files
committed
Use ruff for formatting
1 parent 18de7be commit 29b44be

4 files changed

Lines changed: 6 additions & 16 deletions

File tree

.github/workflows/smoke.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,6 @@ jobs:
123123
conda config --add channels conda-forge
124124
conda config --add channels scientific-python-nightly-wheels
125125
conda create -q -n pyav \
126-
cython==3.1.0b0 \
127126
numpy \
128127
pillow \
129128
pytest \
@@ -135,6 +134,7 @@ jobs:
135134
run: |
136135
. $CONDA/etc/profile.d/conda.sh
137136
conda activate pyav
137+
pip install 'Cython==3.1.0a1'
138138
python scripts\\fetch-vendor.py --config-file scripts\\ffmpeg-${{ matrix.config.ffmpeg }}.json $CONDA_PREFIX\\Library
139139
python scripts\\comptime.py ${{ matrix.config.ffmpeg }}
140140
python setup.py build_ext --inplace --ffmpeg-dir=$CONDA_PREFIX\\Library

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ fate-suite:
2828
rsync -vrltLW rsync://fate-suite.ffmpeg.org/fate-suite/ tests/assets/fate-suite/
2929

3030
lint:
31-
$(PIP) install -U black isort flake8 flake8-pyproject pillow numpy mypy==1.15.0 pytest
32-
black --check av examples tests setup.py
33-
flake8 av
31+
$(PIP) install -U ruff isort pillow numpy mypy==1.15.0 pytest
32+
ruff format --check av examples tests setup.py
3433
isort --check-only --diff av examples tests
3534
mypy av tests
3635

pyproject.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,3 @@ homepage = "https://pyav.basswood-io.com"
5252
profile = "black"
5353
known_first_party = ["av"]
5454
skip = ["av/__init__.py"]
55-
56-
[tool.flake8]
57-
filename = ["*.py", "*.pyx", "*.pxd"]
58-
ignore = ["E203", "W503"]
59-
max-line-length = 142
60-
per-file-ignores = [
61-
"__init__.py:E402,F401",
62-
"*.pyx,*.pxd:E211,E225,E227,E402,E999",
63-
]

tests/test_decode.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,9 @@ def test_hardware_decode(self) -> None:
218218
)
219219

220220
HWACCEL_DEVICE_TYPE = os.environ["HWACCEL_DEVICE_TYPE"]
221-
assert (
222-
HWACCEL_DEVICE_TYPE in hwdevices_available
223-
), f"{HWACCEL_DEVICE_TYPE} not available"
221+
assert HWACCEL_DEVICE_TYPE in hwdevices_available, (
222+
f"{HWACCEL_DEVICE_TYPE} not available"
223+
)
224224

225225
test_video_path = "tests/assets/black.mp4"
226226
make_h264_test_video(test_video_path)

0 commit comments

Comments
 (0)