lint: reformat python code with black
This commit is contained in:
parent
331beb01b4
commit
a406a7974b
88 changed files with 2579 additions and 1608 deletions
|
@ -1,8 +1,7 @@
|
|||
from flask import current_app
|
||||
from github import Github
|
||||
|
||||
from app.terraform.block.bridge_reachability import \
|
||||
BlockBridgeReachabilityAutomation
|
||||
from app.terraform.block.bridge_reachability import BlockBridgeReachabilityAutomation
|
||||
|
||||
|
||||
class BlockBridgeGitHubAutomation(BlockBridgeReachabilityAutomation):
|
||||
|
@ -15,12 +14,13 @@ class BlockBridgeGitHubAutomation(BlockBridgeReachabilityAutomation):
|
|||
frequency = 30
|
||||
|
||||
def fetch(self) -> None:
|
||||
github = Github(current_app.config['GITHUB_API_KEY'])
|
||||
repo = github.get_repo(current_app.config['GITHUB_BRIDGE_REPO'])
|
||||
for vantage_point in current_app.config['GITHUB_BRIDGE_VANTAGE_POINTS']:
|
||||
github = Github(current_app.config["GITHUB_API_KEY"])
|
||||
repo = github.get_repo(current_app.config["GITHUB_BRIDGE_REPO"])
|
||||
for vantage_point in current_app.config["GITHUB_BRIDGE_VANTAGE_POINTS"]:
|
||||
contents = repo.get_contents(f"recentResult_{vantage_point}")
|
||||
if isinstance(contents, list):
|
||||
raise RuntimeError(
|
||||
f"Expected a file at recentResult_{vantage_point}"
|
||||
" but got a directory.")
|
||||
self._lines = contents.decoded_content.decode('utf-8').splitlines()
|
||||
" but got a directory."
|
||||
)
|
||||
self._lines = contents.decoded_content.decode("utf-8").splitlines()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue