Skip to content

Commit 3bb3cfe

Browse files
bump min python version for ruff (#178)
* bump min python version for ruff * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * fix lint error --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 3d186d2 commit 3bb3cfe

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,8 @@ extend-include = ["*.pyi?"]
199199
indent-width = 4
200200
# Same as Black.
201201
line-length = 88
202-
# Assume Python >3.8
203-
target-version = "py38"
202+
# Assume Python >3.10
203+
target-version = "py310"
204204

205205
[tool.ruff.format]
206206
# Like Black, indent with spaces, rather than tabs.

src/django_bird/templates.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ def visit_ExtendsNode(self, node: ExtendsNode, context: Context) -> None:
179179
def visit_IncludeNode(self, node: IncludeNode, context: Context) -> None:
180180
try:
181181
included_templates = node.template.resolve(context)
182-
if not isinstance(included_templates, (list, tuple)):
182+
if not isinstance(included_templates, list | tuple):
183183
included_templates = [included_templates]
184184
for template_name in included_templates:
185185
included_template = self.engine.get_template(template_name)

tests/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def print_directory_tree(root_dir: str | Path, prefix: str = ""):
7676
root_path = Path(root_dir)
7777
contents = sorted(root_path.iterdir())
7878
pointers = ["├── "] * (len(contents) - 1) + ["└── "]
79-
for pointer, path in zip(pointers, contents):
79+
for pointer, path in zip(pointers, contents, strict=False):
8080
print(prefix + pointer + path.name)
8181
if path.is_dir():
8282
extension = "│ " if pointer == "├── " else " "

0 commit comments

Comments
 (0)