Skip to content

Commit

Permalink
Iterable example suffered from bad autoformatting at some point.
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidCEllis committed Jul 17, 2024
1 parent 984989b commit 7b78a77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/extension_examples.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def iter_generator(cls, funcname="__iter__"):
field_yield = "\n".join(f" yield self.{f}" for f in field_names)
if not field_yield:
field_yield = " yield from ()"
code = f"def {funcname}(self):\n" f"{field_yield}"
code = f"def {funcname}(self):\n{field_yield}"
globs = {}
return GeneratedCode(code, globs)

Expand Down
2 changes: 1 addition & 1 deletion docs_code/docs_ex3_iterable.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def iter_generator(cls, funcname="__iter__"):
field_yield = "\n".join(f" yield self.{f}" for f in field_names)
if not field_yield:
field_yield = " yield from ()"
code = f"def {funcname}(self):\n" f"{field_yield}"
code = f"def {funcname}(self):\n{field_yield}"
globs = {}
return GeneratedCode(code, globs)

Expand Down

0 comments on commit 7b78a77

Please sign in to comment.