You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These both result in the All conditional function variants must have identical signatures warning:
try:
frommathimportcombexceptImportError:
defcomb(n: int, k: int) ->int: # All conditional function variants must have identical signaturesreturnint(factorial(n) /factorial(k) /factorial(n-k))
importsysifsys.version_info>= (3, 8):
frommathimportcombelse:
defcomb(n: int, k: int) ->int: # All conditional function variants must have identical signaturesreturnint(factorial(n) /factorial(k) /factorial(n-k))
Typeshed conditionally definesmath.comb as def comb(__n: int, __k: int) -> int: .... Changing the parameter names in either of the above examples to match the typeshed signature silences the warning: