]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-104683: Argument clinic: Make the `filename` parameter to `Clinic` required (...
authorAlex Waygood <Alex.Waygood@Gmail.com>
Sat, 29 Jul 2023 18:46:52 +0000 (19:46 +0100)
committerGitHub <noreply@github.com>
Sat, 29 Jul 2023 18:46:52 +0000 (19:46 +0100)
Tools/clinic/clinic.py

index cb999c156ee28b2537cd1f868ec1f760f21b80d7..3c16dc389e3ebc7b19de60117cf2415e8644a6da 100755 (executable)
@@ -2015,7 +2015,6 @@ class Destination:
         if self.type =='file':
             d = {}
             filename = self.clinic.filename
-            assert filename is not None
             d['path'] = filename
             dirname, basename = os.path.split(filename)
             if not dirname:
@@ -2133,8 +2132,8 @@ impl_definition block
             language: CLanguage,
             printer: BlockPrinter | None = None,
             *,
+            filename: str,
             verify: bool = True,
-            filename: str | None = None
     ) -> None:
         # maps strings to Parser objects.
         # (instantiated from the "parsers" global.)