diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2023-04-22 21:49:07 -0400 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2023-04-22 21:49:07 -0400 |
| commit | d3fa2f90fa12a9301adb76e69b36972f85a3066e (patch) | |
| tree | ed07933f87f8edf212612b90a3b6c20eb215cd5a | |
| parent | Use str(e) instead of e.message (diff) | |
| download | taskipy2-d3fa2f90fa12a9301adb76e69b36972f85a3066e.zip | |
Resolve linting errors
| -rwxr-xr-x | taskipy/cli.py | 4 | ||||
| -rw-r--r-- | taskipy/io.py | 1 | ||||
| -rw-r--r-- | taskipy/list.py | 4 | ||||
| -rw-r--r-- | taskipy/task_runner.py | 4 |
4 files changed, 6 insertions, 7 deletions
diff --git a/taskipy/cli.py b/taskipy/cli.py index 48fb634..e4a57fd 100755 --- a/taskipy/cli.py +++ b/taskipy/cli.py @@ -4,7 +4,7 @@ import sys from pathlib import Path from typing import List, Type, Union -from taskipy import io +from taskipy.io import AbstractIO, AppIO from taskipy.exceptions import TaskipyError, InvalidUsageError from taskipy.task_runner import TaskRunner @@ -16,7 +16,7 @@ def main(): def run( args: List[str], - io: Type[io.AbstractIO] = io.AppIO(), + io: Type[AbstractIO] = AppIO(), # pylint: disable=C0103 cwd: Union[str, Path, None] = None ) -> int: """Run the taskipy CLI programmatically. diff --git a/taskipy/io.py b/taskipy/io.py index ec604c7..5de35ee 100644 --- a/taskipy/io.py +++ b/taskipy/io.py @@ -9,4 +9,3 @@ class AbstractIO(abc.ABC): class AppIO(AbstractIO): def write_line(self, line: str) -> None: print(line) - diff --git a/taskipy/list.py b/taskipy/list.py index 00d0edd..52cdca2 100644 --- a/taskipy/list.py +++ b/taskipy/list.py @@ -3,7 +3,7 @@ import textwrap import colorama # type: ignore from typing import List, Type, Optional -from taskipy import io +from taskipy.io import AbstractIO from taskipy.task import Task from taskipy.exceptions import EmptyTasksSectionError @@ -16,7 +16,7 @@ class TasksListFormatter: self.__tasks = tasks colorama.init() - def print(self, io: Type[io.AbstractIO], line_width: Optional[int] = None): + def print(self, io: Type[AbstractIO], line_width: Optional[int] = None): # pylint: disable=C0103 if not line_width: line_width = shutil.get_terminal_size().columns diff --git a/taskipy/task_runner.py b/taskipy/task_runner.py index f05c136..07872d4 100644 --- a/taskipy/task_runner.py +++ b/taskipy/task_runner.py @@ -8,8 +8,8 @@ from typing import Callable, Dict, List, Tuple, Type, Union, Optional import psutil # type: ignore -from taskipy import io from taskipy.exceptions import CircularVariableError, TaskNotFoundError, MalformedTaskError +from taskipy.io import AbstractIO from taskipy.list import TasksListFormatter from taskipy.pyproject import PyProject from taskipy.task import Task @@ -27,7 +27,7 @@ class TaskRunner: self.__working_dir = working_dir self.__project = PyProject(working_dir) - def list(self, io: Type[io.AbstractIO]): + def list(self, io: Type[AbstractIO]): # pylint: disable=C0103 """lists tasks to stdout""" formatter = TasksListFormatter(self.__project.tasks.values()) formatter.print(io) |