Skip to content

Commit

Permalink
Merge branch '3.1.x'
Browse files Browse the repository at this point in the history
  • Loading branch information
davidism committed Jun 27, 2023
2 parents 7b48764 + 8d0ea74 commit c0e4f69
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- {name: '3.9', python: '3.9', os: ubuntu-latest, tox: py39}
- {name: '3.8', python: '3.8', os: ubuntu-latest, tox: py38}
- {name: '3.7', python: '3.7', os: ubuntu-latest, tox: py37}
- {name: 'PyPy', python: 'pypy-3.9', os: ubuntu-latest, tox: pypy39}
- {name: 'PyPy', python: 'pypy-3.10', os: ubuntu-latest, tox: pypy310}
- {name: Typing, python: '3.11', os: ubuntu-latest, tox: typing}
steps:
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
Expand Down
7 changes: 3 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,15 @@ ci:
autoupdate_schedule: monthly
repos:
- repo: https://github.com/asottile/pyupgrade
rev: v3.4.0
rev: v3.7.0
hooks:
- id: pyupgrade
args: ["--py37-plus"]
- repo: https://github.com/asottile/reorder_python_imports
rev: v3.9.0
- repo: https://github.com/asottile/reorder-python-imports
rev: v3.10.0
hooks:
- id: reorder-python-imports
args: ["--application-directories", "src"]
additional_dependencies: ["setuptools>60.9"]
- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ version = {attr = "jinja2.__version__"}
testpaths = ["tests"]
filterwarnings = [
"error",
# change in Python 3.12 beta causes warning from inside pytest
"ignore:ast:DeprecationWarning",
]

[tool.coverage.run]
Expand Down
12 changes: 6 additions & 6 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ colorama==0.4.6
# via tox
distlib==0.3.6
# via virtualenv
filelock==3.12.0
filelock==3.12.2
# via
# tox
# virtualenv
Expand All @@ -36,23 +36,23 @@ pip-compile-multi==2.6.3
# via -r requirements/dev.in
pip-tools==6.13.0
# via pip-compile-multi
platformdirs==3.5.1
platformdirs==3.8.0
# via
# tox
# virtualenv
pre-commit==3.3.2
pre-commit==3.3.3
# via -r requirements/dev.in
pyproject-api==1.5.1
pyproject-api==1.5.2
# via tox
pyproject-hooks==1.0.0
# via build
pyyaml==6.0
# via pre-commit
toposort==1.10
# via pip-compile-multi
tox==4.5.2
tox==4.6.3
# via -r requirements/dev.in
virtualenv==20.23.0
virtualenv==20.23.1
# via
# pre-commit
# tox
Expand Down
6 changes: 3 additions & 3 deletions requirements/docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ imagesize==1.4.1
# via sphinx
jinja2==3.1.2
# via sphinx
markupsafe==2.1.2
markupsafe==2.1.3
# via jinja2
packaging==23.1
# via
# pallets-sphinx-themes
# sphinx
pallets-sphinx-themes==2.1.0
pallets-sphinx-themes==2.1.1
# via -r requirements/docs.in
pygments==2.15.1
# via sphinx
Expand Down Expand Up @@ -57,5 +57,5 @@ sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.5
# via sphinx
urllib3==2.0.2
urllib3==2.0.3
# via requests
4 changes: 2 additions & 2 deletions requirements/tests.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ iniconfig==2.0.0
# via pytest
packaging==23.1
# via pytest
pluggy==1.0.0
pluggy==1.2.0
# via pytest
pytest==7.3.1
pytest==7.4.0
# via -r requirements/tests.in
tomli==2.0.1
# via pytest
4 changes: 2 additions & 2 deletions requirements/typing.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
#
# pip-compile-multi
#
mypy==1.3.0
mypy==1.4.1
# via -r requirements/typing.in
mypy-extensions==1.0.0
# via mypy
tomli==2.0.1
# via mypy
typing-extensions==4.6.2
typing-extensions==4.6.3
# via mypy
2 changes: 1 addition & 1 deletion src/jinja2/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ def list_templates(
)

def filter_func(x: str) -> bool:
return "." in x and x.rsplit(".", 1)[1] in extensions # type: ignore
return "." in x and x.rsplit(".", 1)[1] in extensions

if filter_func is not None:
names = [name for name in names if filter_func(name)]
Expand Down
4 changes: 1 addition & 3 deletions src/jinja2/runtime.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,9 +930,7 @@ def make_logging_undefined(
logger.addHandler(logging.StreamHandler(sys.stderr))

def _log_message(undef: Undefined) -> None:
logger.warning( # type: ignore
"Template variable warning: %s", undef._undefined_message
)
logger.warning("Template variable warning: %s", undef._undefined_message)

class LoggingUndefined(base): # type: ignore
__slots__ = ()
Expand Down
2 changes: 1 addition & 1 deletion src/jinja2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ def urlize(
if trim_url_limit is not None:

def trim_url(x: str) -> str:
if len(x) > trim_url_limit: # type: ignore
if len(x) > trim_url_limit:
return f"{x[:trim_url_limit]}..."

return x
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[tox]
envlist =
py3{12,11,10,9,8,7}
pypy39
pypy310
style
typing
docs
Expand Down

0 comments on commit c0e4f69

Please sign in to comment.