From 14f2249d5a69b45ff0574bf79af5961f3e402682 Mon Sep 17 00:00:00 2001 From: Denis Anikin Date: Mon, 18 Oct 2021 04:04:12 +0300 Subject: [PATCH] Mypy fixes --- .github/workflows/default.yml | 3 ++- envcast/base.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index 1f5f3e3..f32e149 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -23,9 +23,10 @@ jobs: run: | pip install poetry poetry install - - name: Check code base via pylint + - name: Run linting run: | poetry run pylint --fail-under 10.0 **/*.py + poetry run mypy . - name: Build package and check installation process is ok run: | poetry build diff --git a/envcast/base.py b/envcast/base.py index ae6dbcf..9f6c546 100644 --- a/envcast/base.py +++ b/envcast/base.py @@ -17,7 +17,7 @@ class GenericEnvironmentProcessor: """Main class for the app.""" - BOOLEAN_VALUES: tuple[str] = ("1", "y", "yes", "true", "ok", "okay", "on", "enabled") + BOOLEAN_VALUES: tuple[str, ...] = ("1", "y", "yes", "true", "ok", "okay", "on", "enabled") SEPARATORS_FOR_LIST_TYPE: set[str] = {"|", ",", " "} @abc.abstractmethod @@ -103,6 +103,7 @@ def set_dotenv_path( if not self._path_for_dotenv.is_file() or not self._path_for_dotenv.exists(): raise exceptions.IncorrectDotenvPath(str(self._path_for_dotenv)) self._path_for_dotenv = pathlib.Path(full_path).resolve() + return self @functools.lru_cache(maxsize=None) def _load_dotenv_file(self) -> dict: