Skip to content

Commit 3eec808

Browse files
committed
feat: simplify, unify lint
1 parent e4b6e3f commit 3eec808

File tree

3 files changed

+10
-15
lines changed

3 files changed

+10
-15
lines changed

.github/workflows/lint.yaml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,7 @@ on:
66
- dev
77

88
jobs:
9-
darker:
10-
runs-on: ubuntu-latest
11-
steps:
12-
- uses: actions/checkout@v3
13-
with:
14-
fetch-depth: 0
15-
- uses: actions/setup-python@v4
16-
- uses: akaihola/darker@1.7.2
17-
with:
18-
options: "--check --diff --isort --color"
19-
version: "~=1.7.2"
20-
21-
lint-diffs:
9+
lint:
2210
runs-on: ubuntu-latest
2311
steps:
2412
- name: Commit Range
@@ -37,4 +25,4 @@ jobs:
3725
pip install -r requirements.lint.txt
3826
- name: Lint
3927
run: |
40-
inv lint --diff --no-format --revision=${{ steps.commit-range.outputs.commit-range }}
28+
inv lint --diff --revision=${{ steps.commit-range.outputs.commit-range }}

pyproject.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
line-length = 120
33
target-version = ['py38']
44

5+
[tool.darker]
6+
revision = 'origin/dev'
7+
color = true
8+
isort = true
9+
flynt = true
10+
check = true
11+
512
[tool.isort]
613
profile = "black"
714
known_third_party = ["pytest"]

tasks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def lint(c, incremental=True, format=True, revision="origin/dev", diff=False):
5656
diff = "--diff" if diff else ""
5757
if incremental:
5858
if format:
59-
c.run(f"darker --revision {revision}... {diff} --flynt --isort --color --check .")
59+
c.run(f"darker --revision {revision}... {diff} .")
6060
out = c.run(f"git diff -U0 {revision} | lint-diffs")
6161
if out.stdout.strip() != "=== pylint: mine=0, always=0":
6262
print(out.stdout)

0 commit comments

Comments
 (0)