From 7b78a77a3bf0344e880dc0be274307edf3f4c085 Mon Sep 17 00:00:00 2001 From: David C Ellis Date: Wed, 17 Jul 2024 16:32:28 +0100 Subject: [PATCH] Iterable example suffered from bad autoformatting at some point. --- docs/extension_examples.md | 2 +- docs_code/docs_ex3_iterable.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/extension_examples.md b/docs/extension_examples.md index dbd25f6..49bd7d4 100644 --- a/docs/extension_examples.md +++ b/docs/extension_examples.md @@ -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) diff --git a/docs_code/docs_ex3_iterable.py b/docs_code/docs_ex3_iterable.py index d0dbb3f..6969b9d 100644 --- a/docs_code/docs_ex3_iterable.py +++ b/docs_code/docs_ex3_iterable.py @@ -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)