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

Method _is

tools/flake8_plugin.py:645–651  ·  view source on GitHub ↗
(self, node: ast.expr, attrs: frozenset[str], locals_: set[str])

Source from the content-addressed store, hash-verified

643 self.hand_offs: list[tuple[int, int, str, str]] = []
644
645 def _is(self, node: ast.expr, attrs: frozenset[str], locals_: set[str]) -> bool:
646 node = _unwrap_copy(node)
647 if isinstance(node, ast.Name):
648 return node.id in locals_
649 # The attribute has to hang off the request. `serializer.data` and
650 # `response.data` are outputs, not parameters a client sent.
651 return isinstance(node, ast.Attribute) and node.attr in attrs and _is_request(node.value)
652
653 def is_query(self, node: ast.expr) -> bool:
654 return self._is(node, _QUERY_ATTRS, self.query_locals)

Callers 2

is_queryMethod · 0.95
is_bodyMethod · 0.95

Calls 2

_unwrap_copyFunction · 0.85
_is_requestFunction · 0.85

Tested by

no test coverage detected