diff --git a/README.md b/README.md index f9d7339..9e4d950 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ then to run: Extensions(94) | Tools(61) ----------:| ----- .* | [contents](http://pygments.org/) • metadata • [git_blame](https://git-scm.com/docs/git-blame) • [git_log](https://git-scm.com/docs/git-log) -.py | [python_syntax](https://en.wikipedia.org/wiki/Python_syntax_and_semantics) • [python_unittests](https://docs.python.org/3/library/unittest.html) • [pydoc](https://docs.python.org/3/library/pydoc.html) • [mypy](http://mypy-lang.org/) • [python_coverage](https://coverage.readthedocs.io/) • [pycodestyle](http://pycodestyle.pycqa.org/en/latest/) • [pydocstyle](http://pycodestyle.pycqa.org/en/latest/) • [pyflakes](https://pypi.org/project/pyflakes/) • [pylint](https://www.pylint.org/) • [python_gut](https://github.com/ahamilton/eris/blob/master/gut.py) • [python_modulefinder](https://docs.python.org/3/library/modulefinder.html) • [dis](https://docs.python.org/3/library/dis.html) • [python_mccabe](https://pypi.org/project/mccabe/) • [bandit](https://pypi.org/project/bandit/) +.py | [python_syntax](https://en.wikipedia.org/wiki/Python_syntax_and_semantics) • [python_unittests](https://docs.python.org/3/library/unittest.html) • [pydoc](https://docs.python.org/3/library/pydoc.html) • [mypy](http://mypy-lang.org/) • [python_coverage](https://coverage.readthedocs.io/) • [pycodestyle](http://pycodestyle.pycqa.org/en/latest/) • [pydocstyle](http://www.pydocstyle.org/en/2.1.1/usage.html) • [pyflakes](https://pypi.org/project/pyflakes/) • [pylint](https://www.pylint.org/) • [python_gut](https://github.com/ahamilton/eris/blob/master/gut.py) • [python_modulefinder](https://docs.python.org/3/library/modulefinder.html) • [dis](https://docs.python.org/3/library/dis.html) • [python_mccabe](https://pypi.org/project/mccabe/) • [bandit](https://pypi.org/project/bandit/) .pl .pm .t | [perl_syntax](https://en.wikipedia.org/wiki/Perl) • [perldoc](http://perldoc.perl.org/) • [perltidy](http://perltidy.sourceforge.net/) .pod .pod6 | [perldoc](http://perldoc.perl.org/) .java | [uncrustify](https://github.com/uncrustify/uncrustify) @@ -38,7 +38,7 @@ Extensions(94) | Tools(61) .php | [php7_syntax](https://en.wikipedia.org/wiki/PHP) .go | [gofmt](https://golang.org) • [go_vet](https://golang.org) • [golint](https://github.com/golang/lint) • [godoc](http://golang.org/x/tools) .bash .sh .dash .ksh | [shellcheck](https://www.shellcheck.net/) -.pdf | [pdf2txt](https://euske.github.io/pdfminer/) +.pdf | [pdf2txt](https://github.com/pdfminer/pdfminer.six) .html .htm | [html_syntax](http://www.html-tidy.org/) • [tidy](http://www.html-tidy.org/) • [html2text](http://www.mbayer.de/html2text/) • [pandoc](https://pandoc.org/) .yaml .yml | [yamllint](https://github.com/adrienverge/yamllint) .md .epub .docx .odt .rst | [pandoc](https://pandoc.org/) diff --git a/eris/tools.py b/eris/tools.py index 577b111..3f26132 100644 --- a/eris/tools.py +++ b/eris/tools.py @@ -340,27 +340,6 @@ def python_coverage(path): "No corresponding test file: " + os.path.normpath(test_path)) -@deps(deps={"pip/pycodestyle"}, url="http://pycodestyle.pycqa.org/en/latest/") -def pycodestyle(path): - return _run_command([PYTHON_EXECUTABLE, "-m", "pycodestyle", path]) - - -@deps(deps={"pip/pydocstyle"}, url="http://pycodestyle.pycqa.org/en/latest/") -def pydocstyle(path): - return _run_command([PYTHON_EXECUTABLE, "-m", "pydocstyle", path]) - - -@deps(deps={"pip/pyflakes"}, url="https://pypi.org/project/pyflakes/") -def pyflakes(path): - return _run_command([PYTHON_EXECUTABLE, "-m", "pyflakes", path]) - - -@deps(deps={"pip/pylint"}, url="https://www.pylint.org/") -def pylint(path): - return _run_command([PYTHON_EXECUTABLE, "-m", "pylint", "--errors-only", - path]) - - @deps(url="https://github.com/ahamilton/eris/blob/master/gut.py") def python_gut(path): with open(path) as module_file: @@ -369,17 +348,6 @@ def python_gut(path): return Status.normal, source_widget -@deps(url="https://docs.python.org/3/library/modulefinder.html") -def python_modulefinder(path): - return _run_command([PYTHON_EXECUTABLE, "-m", "modulefinder", path], - Status.normal) - - -@deps(url="https://docs.python.org/3/library/dis.html") -def dis(path): - return _run_command([PYTHON_EXECUTABLE, "-m", "dis", path], Status.normal) - - def _get_mccabe_line_score(line): position, function_name, score = line.split() return int(score) diff --git a/eris/tools.toml b/eris/tools.toml index 8c6d2d5..ec9de86 100644 --- a/eris/tools.toml +++ b/eris/tools.toml @@ -44,6 +44,39 @@ tools_for_extensions = [ [["iso"], ["isoinfo"]], ] + +[pycodestyle] + dependencies = ["pip/pycodestyle"] + url = "http://pycodestyle.pycqa.org/en/latest/" + command = "python3.7 -m pycodestyle" + +[pydocstyle] + dependencies = ["pip/pydocstyle"] + url = "http://www.pydocstyle.org/en/2.1.1/usage.html" + command = "python3.7 -m pydocstyle" + +[pyflakes] + dependencies = ["pip/pyflakes"] + url = "https://pypi.org/project/pyflakes/" + command = "python3.7 -m pyflakes" + +[pylint] + dependencies = ["pip/pylint"] + url = "https://www.pylint.org/" + command = "python3.7 -m pylint --errors-only" + +[python_modulefinder] + dependencies = [] + url = "https://docs.python.org/3/library/modulefinder.html" + command = "python3.7 -m modulefinder" + success_status = "normal" + +[dis] + dependencies = [] + url = "https://docs.python.org/3/library/dis.html" + command = "python3.7 -m dis" + success_status = "normal" + [git_blame] dependencies = ["git"] url = "https://git-scm.com/docs/git-blame"