MCPcopy Create free account
hub / github.com/python/mypy / is_unique_args

Function is_unique_args

mypy/stubdoc.py:414–416  ·  view source on GitHub ↗

return true if function argument names are unique

(sig: FunctionSig)

Source from the content-addressed store, hash-verified

412 sigs = state.get_signatures()
413
414 def is_unique_args(sig: FunctionSig) -> bool:
415 """return true if function argument names are unique"""
416 return len(sig.args) == len({arg.name for arg in sig.args})
417
418 # Return only signatures that have unique argument names. Mypy fails on non-unique arg names.
419 return [sig for sig in sigs if is_unique_args(sig)]

Callers 1

infer_sig_from_docstringFunction · 0.85

Calls 1

lenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…