diff --git a/Makefile b/Makefile index 0784f44..797134d 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ test-lint: ## Run code linting tests pylint --errors-only --enable=unused-import,unused-argument --ignore=templates --ignore=docs/_ext ${SRC_DIRS} test-types: ## Run type checks. - mypy --exclude=templates --ignore-missing-imports --implicit-reexport ${SRC_DIRS} + mypy --exclude=templates --ignore-missing-imports --implicit-reexport --strict ${SRC_DIRS} format: ## Format code automatically black $(BLACK_OPTS) diff --git a/tutorpicasso/commands/enable_themes.py b/tutorpicasso/commands/enable_themes.py index c92f13c..cf5348b 100644 --- a/tutorpicasso/commands/enable_themes.py +++ b/tutorpicasso/commands/enable_themes.py @@ -1,6 +1,8 @@ import os import subprocess +from typing import Any + import click from tutor import config as tutor_config @@ -18,7 +20,7 @@ def enable_themes() -> None: .decode("utf-8") .strip() ) - config = tutor_config.load(tutor_root) + config: Any = tutor_config.load(tutor_root) if config.get("PICASSO_THEMES"): for theme in config["PICASSO_THEMES"]: diff --git a/tutorpicasso/commands/run_extra_commands.py b/tutorpicasso/commands/run_extra_commands.py index 0d2e75a..68528ac 100644 --- a/tutorpicasso/commands/run_extra_commands.py +++ b/tutorpicasso/commands/run_extra_commands.py @@ -2,7 +2,7 @@ import subprocess # Was necessary to use this for compatibility with Python 3.8 -from typing import List +from typing import List, Any import click from tutor import config as tutor_config @@ -28,7 +28,7 @@ def run_extra_commands() -> None: run_command(command) -def validate_commands(commands: List[str]) -> None: +def validate_commands(commands: Any) -> None: """ Takes all the extra commands sent through config.yml and verifies that all the commands are correct before executing them