Skip to content

Commit

Permalink
Updated code-check
Browse files Browse the repository at this point in the history
  • Loading branch information
cwognum committed Jun 27, 2024
1 parent 00a07ed commit 7542831
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 25 deletions.
25 changes: 5 additions & 20 deletions .github/workflows/code-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,13 @@ on:
- "!gh-pages"

jobs:
python-format-black:
name: Python format [black]
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.10"

- name: Install black
run: |
pip install black>=23
- name: Format
run: black --check .

python-lint-ruff:
name: Python lint [ruff]
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v4
Expand All @@ -46,4 +28,7 @@ jobs:
pip install ruff
- name: Lint
run: ruff .
run: ruff check .

- name: Format
run: ruff format . --check
9 changes: 4 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,13 @@ omit = ["splito/__init__.py"]
output = "coverage.xml"

[tool.ruff]
ignore = [
lint.ignore = [
"E501", # Never enforce `E501` (line length violations).
]
line-length = 110
target-version = "py311"
target-version = "py310"

[tool.ruff.per-file-ignores]
"__init__.py" = [
lint.per-file-ignores."__init__.py" = [
"F401", # imported but unused
"E402", # Module level import not at top of file
]
]

0 comments on commit 7542831

Please sign in to comment.