Bump mako from 1.3.2 to 1.3.3 (#2303)

* Bump mako from 1.3.2 to 1.3.3

Bumps [mako](https://github.com/sqlalchemy/mako) from 1.3.2 to 1.3.3.
- [Release notes](https://github.com/sqlalchemy/mako/releases)
- [Changelog](https://github.com/sqlalchemy/mako/blob/main/CHANGES)
- [Commits](https://github.com/sqlalchemy/mako/commits)

---
updated-dependencies:
- dependency-name: mako
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update mako==1.3.3

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>

[skip ci]
This commit is contained in:
dependabot[bot] 2024-04-18 13:01:09 -07:00 committed by GitHub
parent 6a9e532805
commit 80984bd296
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 41 additions and 9 deletions

View file

@ -838,13 +838,24 @@ class _GenerateRenderMethod:
text = node.text
self.printer.writeline(text)
children = node.get_children()
# this covers the three situations where we want to insert a pass:
# 1) a ternary control line with no children,
# 2) a primary control line with nothing but its own ternary
# and end control lines, and
# 3) any control line with no content other than comments
if not children or (
all(
# this covers the four situations where we want to insert a pass:
# 1) a ternary control line with no children,
# 2) a primary control line with nothing but its own ternary
# and end control lines, and
# 3) any control line with no content other than comments
# 4) the first control block with no content other than comments
def _search_for_control_line():
for c in children:
if isinstance(c, parsetree.Comment):
continue
elif isinstance(c, parsetree.ControlLine):
return True
return False
if (
not children
or all(
isinstance(c, (parsetree.Comment, parsetree.ControlLine))
for c in children
)
@ -853,6 +864,7 @@ class _GenerateRenderMethod:
for c in children
if isinstance(c, parsetree.ControlLine)
)
or _search_for_control_line()
):
self.printer.writeline("pass")