ci: add flake8
This commit is contained in:
parent
014596d271
commit
dd501a6e4e
32 changed files with 170 additions and 171 deletions
|
@ -83,8 +83,8 @@ class ProxyAutomation(TerraformAutomation):
|
|||
|
||||
def deprecate_orphaned_proxies(self) -> None:
|
||||
proxies = Proxy.query.filter(
|
||||
Proxy.deprecated == None,
|
||||
Proxy.destroyed == None,
|
||||
Proxy.deprecated.is_(None),
|
||||
Proxy.destroyed.is_(None),
|
||||
Proxy.provider == self.provider
|
||||
).all()
|
||||
for proxy in proxies:
|
||||
|
@ -95,7 +95,7 @@ class ProxyAutomation(TerraformAutomation):
|
|||
def destroy_expired_proxies(self) -> None:
|
||||
cutoff = datetime.datetime.utcnow() - datetime.timedelta(days=3)
|
||||
proxies = Proxy.query.filter(
|
||||
Proxy.destroyed == None,
|
||||
Proxy.destroyed.is_(None),
|
||||
Proxy.provider == self.provider,
|
||||
Proxy.deprecated < cutoff
|
||||
).all()
|
||||
|
@ -123,7 +123,7 @@ class ProxyAutomation(TerraformAutomation):
|
|||
groups=Group.query.all(),
|
||||
proxies=Proxy.query.filter(
|
||||
Proxy.provider == self.provider,
|
||||
Proxy.destroyed == None
|
||||
Proxy.destroyed.is_(None)
|
||||
).all(),
|
||||
subgroups=self.get_subgroups(),
|
||||
global_namespace=app.config['GLOBAL_NAMESPACE'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue