@@ -780,7 +780,6 @@ def makenotes(printer, typea, typeb, loca, locb):
780
780
elif types .is_builtin (typ , "round" ):
781
781
valid_forms = lambda : [
782
782
valid_form ("round(x:float) -> numpy.int?" ),
783
- valid_form ("round(x:float, width=?) -> numpy.int?" )
784
783
]
785
784
786
785
self ._unify (node .type , builtins .TInt (),
@@ -791,19 +790,6 @@ def makenotes(printer, typea, typeb, loca, locb):
791
790
792
791
self ._unify (arg .type , builtins .TFloat (),
793
792
arg .loc , None )
794
- elif len (node .args ) == 1 and len (node .keywords ) == 1 and \
795
- builtins .is_numeric (node .args [0 ].type ) and \
796
- node .keywords [0 ].arg == 'width' :
797
- width = node .keywords [0 ].value
798
- if not (isinstance (width , asttyped .NumT ) and isinstance (width .n , int )):
799
- diag = diagnostic .Diagnostic ("error" ,
800
- "the width argument of round() must be an integer literal" , {},
801
- node .keywords [0 ].loc )
802
- self .engine .process (diag )
803
- return
804
-
805
- self ._unify (node .type , builtins .TInt (types .TValue (width .n )),
806
- node .loc , None )
807
793
else :
808
794
diagnose (valid_forms ())
809
795
elif types .is_builtin (typ , "min" ) or types .is_builtin (typ , "max" ):
0 commit comments