Skip to content

Commit 254f1eb

Browse files
committed
fix: remove flynt, check from darker defaults
1 parent cf40248 commit 254f1eb

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

.github/workflows/lint.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ jobs:
2525
pip install -r requirements.lint.txt
2626
- name: Lint
2727
run: |
28-
inv lint --diff --revision=${{ steps.commit-range.outputs.commit-range }}
28+
inv lint --diff --check --revision=${{ steps.commit-range.outputs.commit-range }}

pyproject.toml

+3-5
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ target-version = ['py38']
66
revision = 'origin/dev...'
77
color = true
88
isort = true
9-
flynt = true
10-
check = true
119

1210
[tool.isort]
1311
profile = "black"
@@ -30,9 +28,9 @@ enable = 'useless-suppression'
3028

3129
[tool.pylint.basic]
3230
# Allow arbitrarily short-named variables.
33-
variable-rgx = '[a-z_][a-z0-9_]*'
34-
argument-rgx = '[a-z_][a-z0-9_]*'
35-
attr-rgx = '[a-z_][a-z0-9_]*'
31+
variable-rgx = '[A-Za-z_][a-z0-9_]*'
32+
argument-rgx = '[A-Za-z_][a-z0-9_]*'
33+
attr-rgx = '[A-Za-z_][a-z0-9_]*'
3634

3735
[tool.pylint.design]
3836
ignored-argument-names = ['(_.*|run_as_module)']

tasks.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def _migrate_file(url: str, filename: str):
3131

3232

3333
@task
34-
def lint(c, incremental=True, format=True, revision="origin/dev...", diff=False): # pylint: disable=redefined-builtin
34+
def lint(c, incremental=True, format=True, revision="origin/dev...", diff=False, check=False): # pylint: disable=redefined-builtin
3535
"""Lint and format.
3636
3737
Additional linter settings can be found in `pyproject.toml` (this invocation
@@ -49,9 +49,10 @@ def lint(c, incremental=True, format=True, revision="origin/dev...", diff=False)
4949
Only show formatting changes, do not apply.
5050
"""
5151
diff = "--diff" if diff else ""
52+
check = "--check" if check else ""
5253
if incremental:
5354
if format:
54-
c.run(f"darker --revision {revision} {diff} .")
55+
c.run(f"darker --revision {revision} {diff} {check} .")
5556
out = c.run(f"git diff -U0 {revision} | lint-diffs")
5657
if out.stdout.strip() != "=== pylint: mine=0, always=0":
5758
print(out.stdout)

0 commit comments

Comments
 (0)