@@ -146,6 +146,7 @@ def __init__(self, config, path=None):
146146 self .__builtin_types = {"dict" , "set" , "list" , "unicode" , "str" , "int" , "float" , "long" ,
147147 "bytes" }
148148 self .__codecs_encodings_kwargs = ("encoding" , "data_encoding" , "file_encoding" )
149+ self .__super_no_args = False
149150
150151 # Imported members of modules, like "exc_clear" of "sys".
151152 self .__import_mem_mod = {}
@@ -360,6 +361,9 @@ def union_types(self):
360361 def pattern_matching (self ):
361362 return self .__pattern_matching
362363
364+ def super_no_args (self ):
365+ return self .__super_no_args
366+
363367 def __violates_target_versions (self , versions ):
364368 # If only violations isn't turned on then fake violations because it means it will show the
365369 # rule.
@@ -547,6 +551,9 @@ def minimum_versions(self):
547551 if self .union_types ():
548552 mins = self .__add_versions_entity (mins , (None , (3 , 10 )), "union types as `X | Y`" )
549553
554+ if self .super_no_args ():
555+ mins = self .__add_versions_entity (mins , (None , (3 , 0 )), "super() without arguments" )
556+
550557 for directive in self .strftime_directives ():
551558 if directive in STRFTIME_REQS :
552559 vers = STRFTIME_REQS [directive ]
@@ -1112,6 +1119,9 @@ def visit_Call(self, node):
11121119 is_int_node (node .args [2 ]):
11131120 self .__mod_inverse_pow = True
11141121 self .__vvprint ("modular inverse pow()" , versions = [None , (3 , 8 )])
1122+ elif func .id == "super" and len (node .args ) == 0 :
1123+ self .__super_no_args = True
1124+ self .__vvprint ("super() without arguments" , versions = [None , (3 , 0 )])
11151125 elif hasattr (func , "attr" ):
11161126 attr = func .attr
11171127 if attr == "format" and hasattr (func , "value" ) and isinstance (func .value , ast .Str ) and \
0 commit comments