Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Ruff for linting and formatting #6490

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ trim_trailing_whitespace = true
[**.py]
indent_size = 4
indent_style = space
max_line_length = 79
max_line_length = 100

[Makefile]
indent_style = tab
24 changes: 8 additions & 16 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,17 @@ on:

jobs:
test:

runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version:
- "3.5"
- "3.6"
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "pypy3.9"
- "pypy3.10"

steps:
- uses: actions/checkout@v4
Expand All @@ -45,7 +40,7 @@ jobs:
- name: Install dependencies
run: |
pip install -r requirements.txt
pip install flake8 youtube-dl
pip install ruff youtube-dl

- name: Install yt-dlp
run: |
Expand All @@ -63,16 +58,13 @@ jobs:
;;
esac

- name: Lint with flake8
- name: Lint with Ruff
run: |
case "${{ matrix.python-version }}" in
3.4|3.5|3.6|3.7)
flake8 --extend-exclude scripts/export_tests.py,scripts/pyprint.py .
;;
*)
flake8 .
;;
esac
ruff check

- name: Check formatting with Ruff
run: |
ruff format --check

- name: Run tests
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.devcontainer/
archive/

# Byte-compiled / optimized / DLL files
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ and powerful `filenaming capabilities <https://gdl-org.github.io/docs/formatting
Dependencies
============

- Python_ 3.4+
- Python_ 3.9+
- Requests_

Optional
Expand Down
Loading
Loading