Skip to content

Commit 00d74ef

Browse files
committed
fix: maybe checkout depth
1 parent c7f45f5 commit 00d74ef

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

.github/workflows/lint.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ jobs:
2525
id: commit-range
2626
uses: akaihola/darker/.github/actions/[email protected]
2727
- uses: actions/checkout@v3
28+
with:
29+
fetch-depth: 0
2830
- uses: actions/setup-python@v4
2931
with:
3032
python-version: '3.8'

tasks.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def _migrate_file(url: str, filename: str):
3030

3131

3232
@task
33-
def lint(c, incremental=True, lint=True, format=True, revision="origin/dev", diff=False): # pylint: disable=redefined-outer-name, redefined-builtin
33+
def lint(c, incremental=True, format=True, revision="origin/dev", diff=False): # pylint: disable=redefined-builtin
3434
"""Lint and format.
3535
3636
Additional linter settings can be found in `pyproject.toml` (this invocation
@@ -40,6 +40,8 @@ def lint(c, incremental=True, lint=True, format=True, revision="origin/dev", dif
4040
----------
4141
incremental : bool
4242
Only lint changed files.
43+
format : bool
44+
Apply formatting changes.
4345
revision : str
4446
Revision to compare against.
4547
diff : bool
@@ -54,11 +56,9 @@ def lint(c, incremental=True, lint=True, format=True, revision="origin/dev", dif
5456
if incremental:
5557
if format:
5658
c.run(f"darker --revision {revision}... {diff} --flynt --isort --color --check .")
57-
if lint:
58-
c.run(f"git diff -U0 {revision} | lint-diffs")
59+
c.run(f"git diff -U0 {revision} | lint-diffs")
5960
else:
6061
if format:
6162
c.run(f"black {diff} .")
6263
c.run(f"isort {diff} .")
63-
if lint:
64-
c.run("pylint src/ tests/ integrations/")
64+
c.run("pylint src/ tests/ integrations/")

0 commit comments

Comments
 (0)