MCPcopy Index your code
hub / github.com/python/mypy / is_operator_method

Function is_operator_method

mypy/checkexpr.py:6965–6973  ·  view source on GitHub ↗
(fullname: str | None)

Source from the content-addressed store, hash-verified

6963
6964
6965def is_operator_method(fullname: str | None) -> bool:
6966 if not fullname:
6967 return False
6968 short_name = fullname.split(".")[-1]
6969 return (
6970 short_name in operators.op_methods.values()
6971 or short_name in operators.reverse_op_methods.values()
6972 or short_name in operators.unary_op_methods.values()
6973 )
6974
6975
6976def get_partial_instance_type(t: Type | None) -> PartialType | None:

Callers 1

check_overload_callMethod · 0.85

Calls 2

splitMethod · 0.80
valuesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…