MCPcopy Create free account
hub / github.com/getsentry/sentry / _declared_names

Function _declared_names

tools/flake8_plugin.py:389–395  ·  view source on GitHub ↗

Short names declared under `@extend_schema( =...)`.

(decorators: list[ast.expr], keyword: str)

Source from the content-addressed store, hash-verified

387
388
389def _declared_names(decorators: list[ast.expr], keyword: str) -> set[str]:
390 """Short names declared under `@extend_schema(<keyword>=...)`."""
391 names: set[str] = set()
392 for value in extend_schema_kwarg(decorators, keyword):
393 for element in _declared_elements(value):
394 names.add(_name_of(element).rsplit(".", 1)[-1])
395 return names
396
397
398def _name_of(node: ast.expr) -> str:

Callers 1

_enter_inputMethod · 0.85

Calls 5

extend_schema_kwargFunction · 0.85
_declared_elementsFunction · 0.85
_name_ofFunction · 0.85
addMethod · 0.65
setFunction · 0.50

Tested by

no test coverage detected