Skip to content

Commit ba564f4

Browse files
removed class name and self from super
1 parent 9fac27c commit ba564f4

22 files changed

Lines changed: 30 additions & 30 deletions

sifter/commands/discard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(
3030
tests: Optional[List['Test']] = None,
3131
block: Optional[CommandList] = None
3232
) -> None:
33-
super(CommandDiscard, self).__init__(arguments, tests, block)
33+
super().__init__(arguments, tests, block)
3434
self.validate_arguments()
3535
self.validate_tests_size(0)
3636
self.validate_block_size(0)

sifter/commands/fileinto.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def __init__(
3131
tests: Optional[List['Test']] = None,
3232
block: Optional[CommandList] = None
3333
) -> None:
34-
super(CommandFileInto, self).__init__(arguments, tests, block)
34+
super().__init__(arguments, tests, block)
3535
_, positional_args = self.validate_arguments(
3636
{},
3737
[StringList(length=1), ],

sifter/commands/if_cmd.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def __init__(
2828
tests: Optional[List['Test']] = None,
2929
block: Optional[CommandList] = None
3030
) -> None:
31-
super(CommandIfBase, self).__init__(arguments, tests, block)
31+
super().__init__(arguments, tests, block)
3232
self.validate_arguments()
3333
self.validate_tests_size(1)
3434

@@ -56,7 +56,7 @@ class CommandElsIf(CommandIfBase):
5656
def evaluate(self, message: Message, state: EvaluationState) -> Optional[Actions]:
5757
if state.last_if:
5858
return None
59-
return super(CommandElsIf, self).evaluate(message, state)
59+
return super().evaluate(message, state)
6060

6161

6262
CommandElsIf.register()
@@ -72,7 +72,7 @@ def __init__(
7272
tests: Optional[List['Test']] = None,
7373
block: Optional[CommandList] = None
7474
) -> None:
75-
super(CommandElse, self).__init__(arguments, tests, block)
75+
super().__init__(arguments, tests, block)
7676
self.validate_arguments()
7777
self.validate_tests_size(0)
7878

sifter/commands/keep.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(
3030
tests: Optional[List['Test']] = None,
3131
block: Optional[CommandList] = None
3232
) -> None:
33-
super(CommandKeep, self).__init__(arguments, tests, block)
33+
super().__init__(arguments, tests, block)
3434
self.validate_arguments()
3535
self.validate_tests_size(0)
3636
self.validate_block_size(0)

sifter/commands/redirect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __init__(
3333
tests: Optional[List['Test']] = None,
3434
block: Optional[CommandList] = None
3535
) -> None:
36-
super(CommandRedirect, self).__init__(arguments, tests, block)
36+
super().__init__(arguments, tests, block)
3737
_, positional_args = self.validate_arguments(
3838
{},
3939
[StringList(length=1), ],

sifter/commands/require.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def __init__(
3333
tests: Optional[List['Test']] = None,
3434
block: Optional[CommandList] = None
3535
) -> None:
36-
super(CommandRequire, self).__init__(arguments, tests, block)
36+
super().__init__(arguments, tests, block)
3737
_, positional_args = self.validate_arguments(
3838
{},
3939
[StringList(), ],

sifter/commands/stop.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def __init__(
3030
tests: Optional[List['Test']] = None,
3131
block: Optional[CommandList] = None
3232
) -> None:
33-
super(CommandStop, self).__init__(arguments, tests, block)
33+
super().__init__(arguments, tests, block)
3434
self.validate_arguments()
3535
self.validate_tests_size(0)
3636
self.validate_block_size(0)

sifter/grammar/actions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
class Actions(list): # type: ignore
1414

1515
def __init__(self, implicit_keep: bool = False) -> None:
16-
super(Actions, self).__init__()
16+
super().__init__()
1717
self.implicit_keep = implicit_keep
1818

1919
def append(self, action: Text, action_args: Optional[Union[Text, 'String', List[Union[Text, 'String']]]] = None) -> None:
20-
super(Actions, self).append((action, action_args))
20+
super().append((action, action_args))
2121

2222
def cancel_implicit_keep(self) -> 'Actions':
2323
self.implicit_keep = False

sifter/grammar/command.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,14 @@ def __init__(
3131
tests: Optional[List['Test']] = None,
3232
block: Optional[CommandList] = None
3333
) -> None:
34-
super(Command, self).__init__(arguments, tests)
34+
super().__init__(arguments, tests)
3535
if block is None:
3636
self.block = CommandList()
3737
else:
3838
self.block = block
3939

4040
def __str__(self) -> Text:
41-
s = [super(Command, self).__str__(), ]
41+
s = [super().__str__(), ]
4242
if len(self.block.commands) > 0:
4343
s.append("{\n")
4444
for command in self.block.commands:

sifter/grammar/tag.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class Tag(str):
55

66
def __str__(self) -> Text:
7-
return ":%s" % super(Tag, self).__str__()
7+
return ":%s" % super().__str__()
88

99
def __repr__(self) -> Text:
10-
return "%s('%s')" % ('Tag', super(Tag, self).__repr__())
10+
return "%s('%s')" % ('Tag', super().__repr__())

0 commit comments

Comments
 (0)