From: David Lord Date: Tue, 23 Apr 2024 19:04:51 +0000 (-0700) Subject: Merge branch '3.1.x' X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de6131232af2d7a249e31363b300a42b631f2637;p=thirdparty%2Fjinja.git Merge branch '3.1.x' --- de6131232af2d7a249e31363b300a42b631f2637 diff --cc pyproject.toml index 2b6f6259,c59feefc..7f56da39 --- a/pyproject.toml +++ b/pyproject.toml @@@ -41,10 -42,9 +42,10 @@@ name = "jinja2 [tool.flit.sdist] include = [ "docs/", + "examples/", "requirements/", "tests/", - "CHANGES.rst", + "CHANGES.md", "tox.ini", ] exclude = [ @@@ -70,12 -70,29 +71,31 @@@ files = ["src/jinja2" show_error_codes = true pretty = true strict = true +local_partial_types = true +warn_unreachable = true - [[tool.mypy.overrides]] - module = [ - "jinja2.defaults", - "markupsafe", + [tool.pyright] + pythonVersion = "3.8" + include = ["src/jinja2"] + typeCheckingMode = "basic" + + [tool.ruff] + src = ["src"] + fix = true + show-fixes = true + output-format = "full" + + [tool.ruff.lint] + select = [ + "B", # flake8-bugbear + "E", # pycodestyle error + "F", # pyflakes + "I", # isort + "UP", # pyupgrade + "W", # pycodestyle warning ] - no_implicit_reexport = false + ignore-init-module-imports = true + + [tool.ruff.lint.isort] + force-single-line = true + order-by-type = false diff --cc src/jinja2/environment.py index c9afae31,1d3be0be..09bfa0eb --- a/src/jinja2/environment.py +++ b/src/jinja2/environment.py @@@ -672,7 -672,7 +674,7 @@@ class Environment stream = ext.filter_stream(stream) # type: ignore if not isinstance(stream, TokenStream): - stream = TokenStream(stream, name, filename) # type: ignore - stream = TokenStream(stream, name, filename) ++ stream = TokenStream(stream, name, filename) # type: ignore[unreachable] return stream