MCPcopy Index your code
hub / github.com/sphinx-doc/sphinx / is_final

Method is_final

sphinx/pycode/parser.py:302–313  ·  view source on GitHub ↗
(self, decorators: list[ast.expr])

Source from the content-addressed store, hash-verified

300 self.annotations[basename, name] = ast_unparse(annotation)
301
302 def is_final(self, decorators: list[ast.expr]) -> bool:
303 final = {f'{modname}.final' for modname in self.typing_mods}
304 final |= self.typing_final_names
305
306 for decorator in decorators:
307 try:
308 if ast_unparse(decorator) in final:
309 return True
310 except NotImplementedError:
311 pass
312
313 return False
314
315 def is_overload(self, decorators: list[ast.expr]) -> bool:
316 overload = {f'{modname}.overload' for modname in self.typing_mods}

Callers 2

visit_ClassDefMethod · 0.95
visit_FunctionDefMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected