aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Triguba <eugenetriguba@gmail.com>2023-04-08 13:32:54 -0400
committerEugene Triguba <eugenetriguba@gmail.com>2023-04-08 13:32:54 -0400
commitcb15068997415dc587add40784c930557fbfac82 (patch)
tree10021678e13fe62f18311cc7f239eb076511a4b8
parentgh-32: Fix usage of sys.argv to ignore executable (diff)
downloadtaskipy2-cb15068997415dc587add40784c930557fbfac82.zip
gh-32: Fix linting warnings/failures
-rw-r--r--.pylintrc2
-rw-r--r--tests/test_taskipy.py17
2 files changed, 14 insertions, 5 deletions
diff --git a/.pylintrc b/.pylintrc
index c291733..5db949b 100644
--- a/.pylintrc
+++ b/.pylintrc
@@ -1,7 +1,6 @@
[MASTER]
disable=
C0114,
- R0201,
W0702,
C0411,
R0903,
@@ -15,4 +14,3 @@ max-line-length=1000
no-docstring-rgx=^.*
const-rgx=^.*
variable-rgx=[a-z_][a-z0-9_]{0,30}$
-missing-module-docstring=^.* \ No newline at end of file
diff --git a/tests/test_taskipy.py b/tests/test_taskipy.py
index 4b9b347..9cf680a 100644
--- a/tests/test_taskipy.py
+++ b/tests/test_taskipy.py
@@ -6,7 +6,7 @@ import time
import unittest
import warnings
from os import path
-from typing import List, Tuple
+from typing import List, Optional, Tuple
from parameterized import parameterized # type: ignore
import psutil # type: ignore
@@ -26,12 +26,23 @@ class TaskipyTestCase(unittest.TestCase):
for tmp_dir in self._tmp_dirs:
tmp_dir.clean()
- def run_task(self, task: str, args: List[str] = None, cwd=os.curdir) -> Tuple[int, str, str]:
+ def run_task(
+ self,
+ task: str,
+ args: Optional[List[str]] = None,
+ cwd=os.curdir,
+ ) -> Tuple[int, str, str]:
+ args = args or []
proc = self.start_taskipy_process(task, args=args, cwd=cwd)
stdout, stderr = proc.communicate()
return proc.returncode, stdout.decode(), str(stderr)
- def start_taskipy_process(self, task: str, args: List[str] = None, cwd=os.curdir) -> subprocess.Popen:
+ def start_taskipy_process(
+ self,
+ task: str,
+ args: Optional[List[str]] = None,
+ cwd=os.curdir,
+ ) -> subprocess.Popen:
executable_path = path.abspath('task')
args = args or []
return subprocess.Popen([executable_path, task] + args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd=cwd)