Use Python 3 Style super calls (#11644)
This commit is contained in:
Родитель
674368f66c
Коммит
89e5acc1e2
|
@ -28,7 +28,7 @@ from airflow.providers.exasol.hooks.exasol import ExasolHook
|
|||
|
||||
class TestExasolHookConn(unittest.TestCase):
|
||||
def setUp(self):
|
||||
super(TestExasolHookConn, self).setUp()
|
||||
super().setUp()
|
||||
|
||||
self.connection = models.Connection(
|
||||
login='login',
|
||||
|
@ -67,7 +67,7 @@ class TestExasolHookConn(unittest.TestCase):
|
|||
|
||||
class TestExasolHook(unittest.TestCase):
|
||||
def setUp(self):
|
||||
super(TestExasolHook, self).setUp()
|
||||
super().setUp()
|
||||
|
||||
self.cur = mock.MagicMock()
|
||||
self.conn = mock.MagicMock()
|
||||
|
|
|
@ -47,9 +47,9 @@ class DummySmartSensor(SmartSensorOperator):
|
|||
shard_max=conf.getint('smart_sensor', 'shard_code_upper_limit'),
|
||||
shard_min=0,
|
||||
**kwargs):
|
||||
super(DummySmartSensor, self).__init__(shard_min=shard_min,
|
||||
shard_max=shard_max,
|
||||
**kwargs)
|
||||
super().__init__(shard_min=shard_min,
|
||||
shard_max=shard_max,
|
||||
**kwargs)
|
||||
|
||||
|
||||
class DummySensor(BaseSensorOperator):
|
||||
|
@ -57,7 +57,7 @@ class DummySensor(BaseSensorOperator):
|
|||
exec_fields = ('soft_fail', 'execution_timeout', 'timeout')
|
||||
|
||||
def __init__(self, input_field='test', return_value=False, **kwargs):
|
||||
super(DummySensor, self).__init__(**kwargs)
|
||||
super().__init__(**kwargs)
|
||||
self.input_field = input_field
|
||||
self.return_value = return_value
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ class CustomOperator(BaseOperator):
|
|||
|
||||
@apply_defaults
|
||||
def __init__(self, bash_command=None, **kwargs):
|
||||
super(CustomOperator, self).__init__(**kwargs)
|
||||
super().__init__(**kwargs)
|
||||
self.bash_command = bash_command
|
||||
|
||||
def execute(self, context):
|
||||
|
|
Загрузка…
Ссылка в новой задаче