@@ -18,7 +18,7 @@ class LanguageNotSupportedError(RadishError):
1818
1919 def __init__ (self , language ):
2020 self .language = language
21- super (LanguageNotSupportedError , self ).__init__ ("Language {0 } could not be found" .format (language ))
21+ super ().__init__ ("Language {} could not be found" .format (language ))
2222
2323
2424class FeatureFileNotFoundError (RadishError ):
@@ -28,7 +28,7 @@ class FeatureFileNotFoundError(RadishError):
2828
2929 def __init__ (self , featurefile ):
3030 self .featurefile = featurefile
31- super (FeatureFileNotFoundError , self ).__init__ ("Feature file '{0 }': No such file" .format (featurefile ))
31+ super ().__init__ ("Feature file '{}': No such file" .format (featurefile ))
3232
3333
3434class FeatureFileSyntaxError (RadishError , SyntaxError ):
@@ -45,7 +45,7 @@ class FeatureFileSyntaxError(RadishError, SyntaxError):
4545Link: {docs_link}"""
4646
4747 def __init__ (self , msg ):
48- super (FeatureFileSyntaxError , self ).__init__ (
48+ super ().__init__ (
4949 FeatureFileSyntaxError .MESSAGE_TEMPLATE .format (msg = msg , docs_link = __DOCS__ )
5050 )
5151
@@ -59,8 +59,8 @@ def __init__(self, regex, step_func_name, re_error):
5959 self .regex = regex
6060 self .step_func_name = step_func_name
6161 self .re_error = re_error
62- super (StepRegexError , self ).__init__ (
63- "Cannot compile regex '{0 }' from step '{1 }': {2 }" .format (regex , step_func_name , re_error )
62+ super ().__init__ (
63+ "Cannot compile regex '{}' from step '{}': {}" .format (regex , step_func_name , re_error )
6464 )
6565
6666
@@ -73,8 +73,8 @@ def __init__(self, pattern, step_func_name, error):
7373 self .pattern = pattern
7474 self .step_func_name = step_func_name
7575 self .error = error
76- super (StepPatternError , self ).__init__ (
77- "Cannot compile pattern '{0 }' of step '{1 }': {2 }" .format (pattern , step_func_name , error )
76+ super ().__init__ (
77+ "Cannot compile pattern '{}' of step '{}': {}" .format (pattern , step_func_name , error )
7878 )
7979
8080
@@ -95,7 +95,7 @@ def __init__(self, regex, func1, func2):
9595 self .regex = regex
9696 self .func1 = func1
9797 self .func2 = func2
98- super (SameStepError , self ).__init__ (
98+ super ().__init__ (
9999 SameStepError .MESSAGE_TEMPLATE .format (func2 .__name__ , regex , func1 .__name__ )
100100 )
101101
@@ -118,7 +118,7 @@ def my_step(step):
118118
119119 def __init__ (self , step ):
120120 self .step = step
121- super (StepDefinitionNotFoundError , self ).__init__ (
121+ super ().__init__ (
122122 StepDefinitionNotFoundError .MESSAGE_TEMPLATE .format (
123123 sentence = step .sentence ,
124124 step_path = step .path ,
@@ -144,8 +144,8 @@ class HookError(RadishError):
144144 def __init__ (self , hook_function , failure ):
145145 self .hook_function = hook_function
146146 self .failure = failure
147- super (HookError , self ).__init__ (
148- "Hook '{0 }' from {1 }:{2 } raised: '{3 }: {4 }'" .format (
147+ super ().__init__ (
148+ "Hook '{}' from {}:{} raised: '{}: {}'" .format (
149149 hook_function .__name__ ,
150150 hook_function .__code__ .co_filename ,
151151 hook_function .__code__ .co_firstlineno ,
@@ -163,8 +163,8 @@ class ScenarioNotFoundError(RadishError):
163163 def __init__ (self , scenario_id , amount_of_scenarios ):
164164 self .scenario_id = scenario_id
165165 self .amount_of_scenarios = amount_of_scenarios
166- super (ScenarioNotFoundError , self ).__init__ (
167- "No scenario with id {0 } found. Specify a scenario id between 1 and {1 }" .format (
166+ super ().__init__ (
167+ "No scenario with id {} found. Specify a scenario id between 1 and {}" .format (
168168 scenario_id , amount_of_scenarios
169169 )
170170 )
0 commit comments