Merge pull request #3421 from boxydog/precommit_update_202411
Some checks failed
build / Test - 3.10 - macos (push) Has been cancelled
build / Test - 3.11 - macos (push) Has been cancelled
build / Test - 3.12 - macos (push) Has been cancelled
build / Test - 3.10 - ubuntu (push) Has been cancelled
build / Test - 3.11 - ubuntu (push) Has been cancelled
build / Test - 3.12 - ubuntu (push) Has been cancelled
build / Test - 3.8 - ubuntu (push) Has been cancelled
build / Test - 3.9 - ubuntu (push) Has been cancelled
build / Test - 3.10 - windows (push) Has been cancelled
build / Test - 3.11 - windows (push) Has been cancelled
build / Test - 3.12 - windows (push) Has been cancelled
build / Lint (push) Has been cancelled
build / Test build (push) Has been cancelled
build / Build docs (push) Has been cancelled
build / Deploy (push) Has been cancelled

This commit is contained in:
Justin Mayer 2024-11-03 20:57:55 +01:00 committed by GitHub
commit 4ca1454293
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 8 deletions

View file

@ -2,7 +2,7 @@
# See https://pre-commit.com/hooks.html for info on hooks # See https://pre-commit.com/hooks.html for info on hooks
repos: repos:
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0 rev: v5.0.0
hooks: hooks:
- id: check-added-large-files - id: check-added-large-files
- id: check-ast - id: check-ast
@ -16,14 +16,14 @@ repos:
- repo: https://github.com/astral-sh/ruff-pre-commit - repo: https://github.com/astral-sh/ruff-pre-commit
# ruff version should match the one in pyproject.toml # ruff version should match the one in pyproject.toml
rev: v0.4.10 rev: v0.7.2
hooks: hooks:
- id: ruff - id: ruff
args: [--fix, --exit-non-zero-on-fix] args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format - id: ruff-format
- repo: https://github.com/rtts/djhtml - repo: https://github.com/rtts/djhtml
rev: '3.0.6' rev: '3.0.7'
hooks: hooks:
- id: djhtml - id: djhtml
- id: djcss - id: djcss

View file

@ -87,7 +87,7 @@ _DEFAULT_PATH = _DEFAULT_PATH_TYPE(os.curdir)
def ask(question, answer=str, default=None, length=None): def ask(question, answer=str, default=None, length=None):
if answer == str: if answer is str:
r = "" r = ""
while True: while True:
if default: if default:
@ -110,7 +110,7 @@ def ask(question, answer=str, default=None, length=None):
return r return r
elif answer == bool: elif answer is bool:
r = None r = None
while True: while True:
if default is True: if default is True:
@ -134,7 +134,7 @@ def ask(question, answer=str, default=None, length=None):
else: else:
print("You must answer 'yes' or 'no'") print("You must answer 'yes' or 'no'")
return r return r
elif answer == int: elif answer is int:
r = None r = None
while True: while True:
if default: if default:

View file

@ -23,7 +23,6 @@ except ImportError:
) )
global _THEMES_PATH
_THEMES_PATH = os.path.join( _THEMES_PATH = os.path.join(
os.path.dirname(os.path.abspath(pelican.__file__)), "themes" os.path.dirname(os.path.abspath(pelican.__file__)), "themes"
) )

View file

@ -97,7 +97,7 @@ dev = [
"tox>=4.11.3", "tox>=4.11.3",
"invoke>=2.2.0", "invoke>=2.2.0",
# ruff version should match the one in .pre-commit-config.yaml # ruff version should match the one in .pre-commit-config.yaml
"ruff==0.4.10", "ruff==0.7.2",
"tomli>=2.0.1; python_version < \"3.11\"", "tomli>=2.0.1; python_version < \"3.11\"",
] ]