From cf525363af4f229ee5870d18fd9f86d9713b4812 Mon Sep 17 00:00:00 2001 From: Thomas Sileo Date: Mon, 22 Apr 2019 22:41:58 +0200 Subject: [PATCH] Enable lints for the setup wizard --- .drone.yml | 3 ++- setup_wizard/wizard.py | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.drone.yml b/.drone.yml index be0c6f9..2cba3e2 100644 --- a/.drone.yml +++ b/.drone.yml @@ -10,8 +10,9 @@ steps: - pip install -U pip - pip install mypy flake8 black - black --check . - - flake8 activitypub.py + - flake8 - mypy --ignore-missing-imports . + - mypy --ignore-missing-imports setup_wizard # Build the container images we need for the test suite - name: build_containers diff --git a/setup_wizard/wizard.py b/setup_wizard/wizard.py index 5bdac52..e38d186 100644 --- a/setup_wizard/wizard.py +++ b/setup_wizard/wizard.py @@ -9,7 +9,7 @@ from markdown import markdown from prompt_toolkit import prompt -def main(): +def main() -> None: print("Welcome to microblog.pub setup wizard\n") config_file = Path("/app/out/config/me.yml") @@ -17,10 +17,10 @@ def main(): if config_file.exists() or env_file.exists(): # Spit out the relative path for the "config artifacts" - config_file = "config/me.yml" - env_file = ".env" + rconfig_file = "config/me.yml" + renv_file = ".env" print( - f"Existing setup detected, please delete {config_file} and/or {env_file} before restarting the wizard" + f"Existing setup detected, please delete {rconfig_file} and/or {renv_file} before restarting the wizard" ) sys.exit(2)