https://github.com/python/cpython/commit/a0149fa6cf5792728bb18ee8e63f6f43b1c96934
commit: a0149fa6cf5792728bb18ee8e63f6f43b1c96934
branch: main
author: Erlend E. Aasland <[email protected]>
committer: erlend-aasland <[email protected]>
date: 2024-02-15T13:21:31Z
summary:
gh-113317: Argument Clinic: remove global clinic instance (#115517)
files:
M Tools/clinic/clinic.py
diff --git a/Tools/clinic/clinic.py b/Tools/clinic/clinic.py
index 4fa07ee3db2039..77d492a386651f 100755
--- a/Tools/clinic/clinic.py
+++ b/Tools/clinic/clinic.py
@@ -277,7 +277,7 @@ def __init__(self, filename: str) -> None:
@abc.abstractmethod
def render(
self,
- clinic: Clinic | None,
+ clinic: Clinic,
signatures: Iterable[Module | Class | Function]
) -> str:
...
@@ -630,7 +630,7 @@ def parse_line(self, line: str) -> None:
def render(
self,
- clinic: Clinic | None,
+ clinic: Clinic,
signatures: Iterable[Module | Class | Function]
) -> str:
function = None
@@ -1584,7 +1584,7 @@ def render_option_group_parsing(
def render_function(
self,
- clinic: Clinic | None,
+ clinic: Clinic,
f: Function | None
) -> str:
if f is None or clinic is None:
@@ -2220,7 +2220,6 @@ def __init__(self, clinic: Clinic) -> None: ...
def parse(self, block: Block) -> None: ...
-clinic: Clinic | None = None
class Clinic:
presets_text = """
@@ -2345,9 +2344,6 @@ def __init__(
assert name in self.destination_buffers
preset[name] = buffer
- global clinic
- clinic = self
-
def add_include(self, name: str, reason: str,
*, condition: str | None = None) -> None:
try:
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]