File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change 5252KNOWN_PLATFORMS = _PLATFORMS | _LIBC | _THREADING
5353
5454
55- def _print_platform (
56- platform : str , version : str | bool
57- ) -> str | Callable [[str ], str ]:
58- if version is True :
59- return platform
60- if not version :
61- return sphinx_gettext ("not {platform}" ).format (platform = platform )
62- return f"{ platform } ≥ { version } "
63-
64-
6555class Availability (SphinxDirective ):
6656 has_content = True
6757 required_arguments = 1
@@ -132,6 +122,16 @@ def parse_platforms(self) -> dict[str, str | bool]:
132122 return platforms
133123
134124
125+ def _print_platform (
126+ platform : str , version : str | bool
127+ ) -> str | Callable [[str ], str ]:
128+ if version is True :
129+ return platform
130+ if not version :
131+ return sphinx_gettext ("not {platform}" ).format (platform = platform )
132+ return f"{ platform } ≥ { version } "
133+
134+
135135def setup (app : Sphinx ) -> ExtensionMetadata :
136136 app .add_directive ("availability" , Availability )
137137
You can’t perform that action at this time.
0 commit comments