Skip to content

Commit

Permalink
try ignoring jupyter notebooks completely in lint workflow for now
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsKue committed Aug 16, 2024
1 parent ab6cfce commit 5ab83c4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ jobs:
- name: Run Linter
run: |
ruff check
ruff check --config pyproject.toml
- name: Run Formatter
run: |
ruff format --check
ruff format --check --config pyproject.toml
test:
runs-on: ${{ matrix.os }}
Expand Down
12 changes: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ repos:
args: [ --fix ]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/nbQA-dev/nbQA
rev: 1.6.3
hooks:
# Run ruff for jupyter notebooks.
- id: nbqa-ruff
args: [--ignore=E402] # E402: module level import not at top of file
#- repo: https://github.com/nbQA-dev/nbQA
# rev: 1.6.3
# hooks:
# # Run ruff for jupyter notebooks.
# - id: nbqa-ruff
# args: [--ignore=E402] # E402: module level import not at top of file
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ exclude = [
"node_modules",
"site-packages",
"venv",
"*.ipynb", # ignore jupyter notebooks completely for now
]

# more lenient line width than Black
Expand Down Expand Up @@ -92,10 +93,6 @@ dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
"F403", # * imports
]

"*.ipynb" = [
"E501", # line too long
]

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

0 comments on commit 5ab83c4

Please sign in to comment.