Add pyupgrade tool

This commit is contained in:
Ayaz Salikhov
2021-08-24 16:43:53 +03:00
parent 709f6750ef
commit ec9b7e9301
5 changed files with 16 additions and 12 deletions

View File

@@ -5,7 +5,6 @@ import argparse
import datetime
import logging
import os
from typing import List
from .docker_runner import DockerRunner
from .get_taggers_and_manifests import get_taggers_and_manifests
from .git_helper import GitHelper
@@ -23,7 +22,7 @@ def append_build_history_line(
short_image_name: str,
owner: str,
wiki_path: str,
all_tags: List[str],
all_tags: list[str],
) -> None:
logger.info("Appending build history line")
@@ -43,7 +42,7 @@ def append_build_history_line(
build_history_line = "|".join([date_column, image_column, links_column]) + "|"
home_wiki_file = os.path.join(wiki_path, "Home.md")
with open(home_wiki_file, "r") as f:
with open(home_wiki_file) as f:
file = f.read()
TABLE_BEGINNING = "|-|-|-|\n"
file = file.replace(TABLE_BEGINNING, TABLE_BEGINNING + build_history_line + "\n")
@@ -55,7 +54,7 @@ def create_manifest_file(
short_image_name: str,
owner: str,
wiki_path: str,
manifests: List[ManifestInterface],
manifests: list[ManifestInterface],
container,
) -> None:
manifest_names = [manifest.__name__ for manifest in manifests]