mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Enable flake8-builtins Ruff rule.
This commit is contained in:
parent
9f6cc9f0d7
commit
f44ec52427
7 changed files with 49 additions and 43 deletions
4
tasks.py
4
tasks.py
|
|
@ -56,7 +56,7 @@ def coverage(c):
|
|||
|
||||
|
||||
@task
|
||||
def format(c, check=False, diff=False):
|
||||
def formatcode(c, check=False, diff=False):
|
||||
"""Run Ruff's auto-formatter, optionally with --check or --diff"""
|
||||
check_flag, diff_flag = "", ""
|
||||
if check:
|
||||
|
|
@ -83,7 +83,7 @@ def ruff(c, fix=False, diff=False):
|
|||
def lint(c, fix=False, diff=False):
|
||||
"""Check code style via linting tools."""
|
||||
ruff(c, fix=fix, diff=diff)
|
||||
format(c, check=not fix, diff=diff)
|
||||
formatcode(c, check=not fix, diff=diff)
|
||||
|
||||
|
||||
@task
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue