Skip to content

Commit

Permalink
zero arguments super (#2106)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam authored Sep 21, 2023
1 parent 2a7137f commit c72d254
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions com/win32com/demos/excelRTDServer.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ class ExcelRTDServer:

def __init__(self):
"""Constructor"""
super(ExcelRTDServer, self).__init__()
super().__init__()
self.IsAlive = self.ALIVE
self.__callback = None
self.topics = {}
Expand Down Expand Up @@ -266,7 +266,7 @@ class RTDTopic:
The others are more for convenience."""

def __init__(self, TopicStrings):
super(RTDTopic, self).__init__()
super().__init__()
self.TopicStrings = TopicStrings
self.__currentValue = None
self.__dirty = False
Expand Down Expand Up @@ -332,7 +332,7 @@ class TimeServer(ExcelRTDServer):
INTERVAL = 0.5 # secs. Threaded timer will wake us up at this interval.

def __init__(self):
super(TimeServer, self).__init__()
super().__init__()

# Simply timer thread to ensure we get to update our topics, and
# tell excel about any changes. This is a pretty basic and dirty way to
Expand Down Expand Up @@ -384,7 +384,7 @@ class TimeTopic(RTDTopic):
"""

def __init__(self, TopicStrings):
super(TimeTopic, self).__init__(TopicStrings)
super().__init__(TopicStrings)
try:
self.cmd, self.delay = self.TopicStrings
except Exception as E:
Expand Down
4 changes: 2 additions & 2 deletions com/win32com/makegw/makegwparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@

class error_not_found(Exception):
def __init__(self, msg="The requested item could not be found"):
super(error_not_found, self).__init__(msg)
super().__init__(msg)


class error_not_supported(Exception):
def __init__(self, msg="The required functionality is not supported"):
super(error_not_supported, self).__init__(msg)
super().__init__(msg)


VERBOSE = 0
Expand Down
6 changes: 3 additions & 3 deletions win32/Lib/pywin32_testutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ class TestSkipped(Exception):
# handling for the TestSkipped exception.
class TestResult(TextTestResult):
def __init__(self, *args, **kw):
super(TestResult, self).__init__(*args, **kw)
super().__init__(*args, **kw)
self.skips = {} # count of skips for each reason.

def addError(self, test, err):
Expand Down Expand Up @@ -265,10 +265,10 @@ def addError(self, test, err):
self.stream.write("S")
self.stream.flush()
return
super(TestResult, self).addError(test, err)
super().addError(test, err)

def printErrors(self):
super(TestResult, self).printErrors()
super().printErrors()
for reason, num_skipped in self.skips.items():
self.stream.writeln("SKIPPED: %d tests - %s" % (num_skipped, reason))

Expand Down
6 changes: 3 additions & 3 deletions win32/Lib/win32timezone.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ def __init__(self, *args, **kwargs):
c) a byte structure (using _from_bytes)
"""
try:
super(TimeZoneDefinition, self).__init__(*args, **kwargs)
super().__init__(*args, **kwargs)
return
except (TypeError, ValueError):
pass
Expand Down Expand Up @@ -369,7 +369,7 @@ def __init_from_bytes(
bias, standard_bias, daylight_bias = components[:3]
standard_start = SYSTEMTIME(*components[3:11])
daylight_start = SYSTEMTIME(*components[11:19])
super(TimeZoneDefinition, self).__init__(
super().__init__(
bias,
standard_name,
standard_start,
Expand All @@ -393,7 +393,7 @@ def __init_from_other(self, other):
# ctypes.memmove(ctypes.addressof(self), other, size)

def __getattribute__(self, attr):
value = super(TimeZoneDefinition, self).__getattribute__(attr)
value = super().__getattribute__(attr)
if "bias" in attr:
value = datetime.timedelta(minutes=value)
return value
Expand Down

0 comments on commit c72d254

Please sign in to comment.