We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9fac27c commit ba564f4Copy full SHA for ba564f4
22 files changed
sifter/commands/discard.py
@@ -30,7 +30,7 @@ def __init__(
30
tests: Optional[List['Test']] = None,
31
block: Optional[CommandList] = None
32
) -> None:
33
- super(CommandDiscard, self).__init__(arguments, tests, block)
+ super().__init__(arguments, tests, block)
34
self.validate_arguments()
35
self.validate_tests_size(0)
36
self.validate_block_size(0)
sifter/commands/fileinto.py
@@ -31,7 +31,7 @@ def __init__(
- super(CommandFileInto, self).__init__(arguments, tests, block)
_, positional_args = self.validate_arguments(
{},
37
[StringList(length=1), ],
sifter/commands/if_cmd.py
@@ -28,7 +28,7 @@ def __init__(
28
29
- super(CommandIfBase, self).__init__(arguments, tests, block)
self.validate_tests_size(1)
@@ -56,7 +56,7 @@ class CommandElsIf(CommandIfBase):
56
def evaluate(self, message: Message, state: EvaluationState) -> Optional[Actions]:
57
if state.last_if:
58
return None
59
- return super(CommandElsIf, self).evaluate(message, state)
+ return super().evaluate(message, state)
60
61
62
CommandElsIf.register()
@@ -72,7 +72,7 @@ def __init__(
72
73
74
75
- super(CommandElse, self).__init__(arguments, tests, block)
76
77
78
sifter/commands/keep.py
- super(CommandKeep, self).__init__(arguments, tests, block)
sifter/commands/redirect.py
@@ -33,7 +33,7 @@ def __init__(
- super(CommandRedirect, self).__init__(arguments, tests, block)
38
39
sifter/commands/require.py
- super(CommandRequire, self).__init__(arguments, tests, block)
[StringList(), ],
sifter/commands/stop.py
- super(CommandStop, self).__init__(arguments, tests, block)
sifter/grammar/actions.py
@@ -13,11 +13,11 @@
13
class Actions(list): # type: ignore
14
15
def __init__(self, implicit_keep: bool = False) -> None:
16
- super(Actions, self).__init__()
+ super().__init__()
17
self.implicit_keep = implicit_keep
18
19
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))
+ super().append((action, action_args))
21
22
def cancel_implicit_keep(self) -> 'Actions':
23
self.implicit_keep = False
sifter/grammar/command.py
@@ -31,14 +31,14 @@ def __init__(
- super(Command, self).__init__(arguments, tests)
+ super().__init__(arguments, tests)
if block is None:
self.block = CommandList()
else:
self.block = block
40
def __str__(self) -> Text:
41
- s = [super(Command, self).__str__(), ]
+ s = [super().__str__(), ]
42
if len(self.block.commands) > 0:
43
s.append("{\n")
44
for command in self.block.commands:
sifter/grammar/tag.py
@@ -4,7 +4,7 @@
4
class Tag(str):
5
6
7
- return ":%s" % super(Tag, self).__str__()
+ return ":%s" % super().__str__()
8
9
def __repr__(self) -> Text:
10
- return "%s('%s')" % ('Tag', super(Tag, self).__repr__())
+ return "%s('%s')" % ('Tag', super().__repr__())
0 commit comments