Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 19 additions & 2 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: lint
on: [push]

on: [push, pull_request]

jobs:
lint:
Expand All @@ -8,4 +9,20 @@ jobs:
- uses: actions/checkout@v4
- uses: astral-sh/ruff-action@v3
- run: ruff check
- run: ruff format --check

# typecheck:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4 # Make sure this is included
# - name: Set up Python
# uses: actions/setup-python@v4
# with:
# python-version: '3.x' # Specify your version
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install -r requirements.txt # Or your dependency file
# - name: Run Pyright
# uses: jakebailey/pyright-action@v2
# with:
# project: ./pyrightconfig.json # If you have a config file
23 changes: 8 additions & 15 deletions ruff.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,14 @@ target-version = "py39"

[lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Note the formatter takes care of trailing commas
select = ["E4", "E7", "E9", "F", "W292"]
select = ["E4", "E7", "E9", "F",
# missing-newline-at-end-of-file
"W292",
# trailing commas
"COM812", "COM819",
# use double quotes
"Q000"
]
ignore = []

# Allow fix for all enabled rules (when `--fix`) is provided.
Expand All @@ -47,16 +53,3 @@ unfixable = []

# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[format]
# Like Black, use double quotes for strings.
quote-style = "double"

# Like Black, indent with spaces, rather than tabs.
indent-style = "space"

# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false

# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"