Skip to content

Commit 893e0a0

Browse files
committed
bump black, zimports
Change-Id: Id9afb5a6dfd02ce37b11486a046ca522fcd3c91a
1 parent 4bb7bb3 commit 893e0a0

13 files changed

Lines changed: 5 additions & 19 deletions

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
# See https://pre-commit.com/hooks.html for more hooks
33
repos:
44
- repo: https://github.com/python/black
5-
rev: 22.3.0
5+
rev: 23.9.1
66
hooks:
77
- id: black
88

99
- repo: https://github.com/sqlalchemyorg/zimports
10-
rev: v0.4.1
10+
rev: v0.6.0
1111
hooks:
1212
- id: zimports
1313

mako/cmd.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ def _exit():
2525

2626

2727
def cmdline(argv=None):
28-
2928
parser = ArgumentParser()
3029
parser.add_argument(
3130
"--var",

mako/codegen.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,7 +816,6 @@ def visitExpression(self, node):
816816
)
817817
or len(self.compiler.default_filters)
818818
):
819-
820819
s = self.create_filter_callable(
821820
node.escapes_code.args, "%s" % node.text, True
822821
)
@@ -1181,7 +1180,6 @@ def visitDefTag(self, node):
11811180

11821181
def visitBlockTag(self, node):
11831182
if node is not self.node and not node.is_anonymous:
1184-
11851183
if isinstance(self.node, parsetree.DefTag):
11861184
raise exceptions.CompileException(
11871185
"Named block '%s' not allowed inside of def '%s'"

mako/lookup.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ def __init__(
178178
lexer_cls=None,
179179
include_error_handler=None,
180180
):
181-
182181
self.directories = [
183182
posixpath.normpath(d) for d in util.to_list(directories, ())
184183
]

mako/pyparser.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ def visit_ClassDef(self, node):
6464
self._add_declared(node.name)
6565

6666
def visit_Assign(self, node):
67-
6867
# flip around the visiting of Assign so the expression gets
6968
# evaluated first, in the case of a clause like "x=x+5" (x
7069
# is undeclared)
@@ -99,7 +98,6 @@ def _expand_tuples(self, args):
9998
yield arg
10099

101100
def _visit_function(self, node, islambda):
102-
103101
# push function state onto stack. dont log any more
104102
# identifiers as "declared" until outside of the function,
105103
# but keep logging identifiers as "undeclared". track
@@ -122,7 +120,6 @@ def _visit_function(self, node, islambda):
122120
self.local_ident_stack = local_ident_stack
123121

124122
def visit_For(self, node):
125-
126123
# flip around visit
127124

128125
self.visit(node.iter)

mako/runtime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ def include_file(self, uri, **kwargs):
530530
def _populate(self, d, l):
531531
for ident in l:
532532
if ident == "*":
533-
for (k, v) in self._get_star():
533+
for k, v in self._get_star():
534534
d[k] = v
535535
else:
536536
d[ident] = getattr(self, ident)

mako/template.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626

2727

2828
class Template:
29-
3029
r"""Represents a compiled template.
3130
3231
:class:`.Template` includes a reference to the original

mako/testing/assertions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ def _assert_raises(
103103
check_context=False,
104104
cause_cls=None,
105105
):
106-
107106
with _expect_raises(except_cls, msg, check_context, cause_cls) as ec:
108107
callable_(*args, **kwargs)
109108
return ec.error

test/ext/test_linguaplugin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ class MockOptions:
1818
class MakoExtractTest(TemplateTest):
1919
@pytest.fixture(autouse=True)
2020
def register_lingua_extractors(self):
21-
2221
from lingua.extractors import register_extractors
2322

2423
register_extractors()

test/test_cache.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,6 @@ def invalidate(self, key, **kw):
8080

8181

8282
class CacheTest:
83-
8483
real_backend = "simple"
8584

8685
def _install_mock_cache(self, template, implname=None):

0 commit comments

Comments
 (0)