Skip to content

Commit

Permalink
gh-113317: Argument Clinic: remove global clinic instance (#115517)
Browse files Browse the repository at this point in the history
  • Loading branch information
erlend-aasland authored Feb 15, 2024
1 parent 7f074a7 commit a0149fa
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions Tools/clinic/clinic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
...
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -2220,7 +2220,6 @@ def __init__(self, clinic: Clinic) -> None: ...
def parse(self, block: Block) -> None: ...


clinic: Clinic | None = None
class Clinic:

presets_text = """
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit a0149fa

Please sign in to comment.