mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Bump all of the dev dependencies
- remove upper version caps - updated the minimum version of most of Pelican's runtime deps - replaced black with ruff as a formatter for pelican - added a cache step to the docs CI task so that the docs can be downloaded and inspected.
This commit is contained in:
parent
bfb2587697
commit
8ea27b82f6
3 changed files with 42 additions and 44 deletions
19
tasks.py
19
tasks.py
|
|
@ -52,24 +52,16 @@ def coverage(c):
|
|||
|
||||
|
||||
@task
|
||||
def black(c, check=False, diff=False):
|
||||
"""Run Black auto-formatter, optionally with --check or --diff"""
|
||||
def format(c, check=False, diff=False):
|
||||
"""Run Ruff's auto-formatter, optionally with --check or --diff"""
|
||||
check_flag, diff_flag = "", ""
|
||||
if check:
|
||||
check_flag = "--check"
|
||||
if diff:
|
||||
diff_flag = "--diff"
|
||||
c.run(f"{VENV_BIN}/black {check_flag} {diff_flag} {PKG_PATH} tasks.py", pty=PTY)
|
||||
|
||||
|
||||
@task
|
||||
def isort(c, check=False, diff=False):
|
||||
check_flag, diff_flag = "", ""
|
||||
if check:
|
||||
check_flag = "-c"
|
||||
if diff:
|
||||
diff_flag = "--diff"
|
||||
c.run(f"{VENV_BIN}/isort {check_flag} {diff_flag} .", pty=PTY)
|
||||
c.run(
|
||||
f"{VENV_BIN}/ruff format {check_flag} {diff_flag} {PKG_PATH} tasks.py", pty=PTY
|
||||
)
|
||||
|
||||
|
||||
@task
|
||||
|
|
@ -87,6 +79,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)
|
||||
|
||||
|
||||
@task
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue