tools: Not detecting the type of python files. Assuming python3.
- Also now not using any tools that depend on python2. - Simplifies installation. - Personally not using python2. - Eris is not used widely enough to justify supporting python2 files. - The way of determining whether a source file was python2 or python3 was not very good.
This commit is contained in:
parent
7d412ec8f1
commit
85a5840cff
17 changed files with 53 additions and 140 deletions
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
|
||||
def hi():
|
||||
print "hi"
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
Test results:
|
||||
No issues identified.
|
||||
|
||||
Code scanned:
|
||||
Total lines of code: 2
|
||||
Total lines skipped (#nosec): 0
|
||||
|
||||
Run metrics:
|
||||
Total issues (by severity):
|
||||
Undefined: 0
|
||||
Low: 0
|
||||
Medium: 0
|
||||
High: 0
|
||||
Total issues (by confidence):
|
||||
Undefined: 0
|
||||
Low: 0
|
||||
Medium: 0
|
||||
High: 0
|
||||
Files skipped (0):
|
||||
|
|
@ -1 +0,0 @@
|
|||
input/hi.py:4: error: Missing parentheses in call to 'print'. Did you mean print("hi")?
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
Help on module hi:
|
||||
|
||||
NAME
|
||||
hi
|
||||
|
||||
FILE
|
||||
input/hi.py
|
||||
|
||||
FUNCTIONS
|
||||
hi()
|
||||
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
No config file found, using default configuration
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
|
||||
(B[m[38;2;0;159;107m[48;2;0;0;0m> def hi():(B[m[38;2;255;255;255m[48;2;0;0;0m
|
||||
(B[m[38;2;0;159;107m[48;2;0;0;0m> print "hi"(B[m
|
||||
|
|
@ -1 +0,0 @@
|
|||
(B[m[38;2;106;184;37m[48;2;32;32;32m[1mdef(B[m[38;2;208;208;208m[48;2;32;32;32m (B[m[38;2;68;127;207m[48;2;32;32;32mhi(B[m[38;2;208;208;208m[48;2;32;32;32m():(B[m
|
||||
|
|
@ -1 +0,0 @@
|
|||
("3:0: 'hi'", 1)
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
Name File
|
||||
---- ----
|
||||
m __main__ ./input/hi.py
|
||||
|
|
@ -1 +0,0 @@
|
|||
No tests.
|
||||
|
|
@ -81,7 +81,7 @@ class ToolsTestCase(unittest.TestCase):
|
|||
def test_contents(self):
|
||||
self._test_tool(tools.contents, [("hi3.py", tools.Status.normal)])
|
||||
|
||||
HI_OK = [("hi3.py", tools.Status.ok), ("hi.py", tools.Status.ok)]
|
||||
HI_OK = [("hi3.py", tools.Status.ok)]
|
||||
|
||||
def test_python_syntax(self):
|
||||
self._test_tool(tools.python_syntax, self.HI_OK)
|
||||
|
|
@ -94,8 +94,7 @@ class ToolsTestCase(unittest.TestCase):
|
|||
# ("hi3_test.py", tools.Status.ok),
|
||||
# ("test_foo.py", tools.Status.ok)])
|
||||
|
||||
HI_NORMAL = [("hi3.py", tools.Status.normal),
|
||||
("hi.py", tools.Status.normal)]
|
||||
HI_NORMAL = [("hi3.py", tools.Status.normal)]
|
||||
|
||||
def test_pydoc(self):
|
||||
# FIX: This is failing inside AppImages.
|
||||
|
|
@ -103,8 +102,7 @@ class ToolsTestCase(unittest.TestCase):
|
|||
self._test_tool(tools.pydoc, self.HI_NORMAL)
|
||||
|
||||
def test_mypy(self):
|
||||
self._test_tool(tools.mypy, [("hi3.py", tools.Status.ok),
|
||||
("hi.py", tools.Status.problem)])
|
||||
self._test_tool(tools.mypy, self.HI_OK)
|
||||
|
||||
def test_python_coverage(self):
|
||||
self._test_tool(tools.python_coverage, self.HI_NORMAL)
|
||||
|
|
@ -128,8 +126,7 @@ class ToolsTestCase(unittest.TestCase):
|
|||
self._test_tool(tools.python_mccabe, self.HI_OK)
|
||||
|
||||
def test_bandit(self):
|
||||
self._test_tool(tools.bandit, [("hi3.py", tools.Status.ok),
|
||||
("hi.py", tools.Status.ok)])
|
||||
self._test_tool(tools.bandit, self.HI_OK)
|
||||
|
||||
# FIX: Make the golden-file deterministic
|
||||
# def test_pydisasm(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue