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

Function neg_op

mypy/constraints.py:1391–1399  ·  view source on GitHub ↗

Map SubtypeOf to SupertypeOf and vice versa.

(op: int)

Source from the content-addressed store, hash-verified

1389
1390
1391def neg_op(op: int) -> int:
1392 """Map SubtypeOf to SupertypeOf and vice versa."""
1393
1394 if op == SUBTYPE_OF:
1395 return SUPERTYPE_OF
1396 elif op == SUPERTYPE_OF:
1397 return SUBTYPE_OF
1398 else:
1399 raise ValueError(f"Invalid operator {op}")
1400
1401
1402def find_matching_overload_item(overloaded: Overloaded, template: CallableType) -> CallableType:

Calls 1

ValueErrorClass · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…