jayclassless / tidypy Goto Github PK
View Code? Open in Web Editor NEWA tool that executes a suite of static analysis tools upon a Python project.
License: MIT License
A tool that executes a suite of static analysis tools upon a Python project.
License: MIT License
Need to wait for flake8 to update its support.
I'm not seeing any way to specify a path to the config file. It would be nice if there was an option to do so
Add support for shared/public configuration usage.
Due to removal of lib2to3 support in setuptools
https://setuptools.readthedocs.io/en/latest/history.html#v58-0-0
demjson can no longer be installed with up-to-date packages so install of current tidypy fails.
A pin setuptools<58.0
will work. Moving to demjson3 might also be an option.
pylint has an option to disable specific checks for an entire file py if there's a # pylint: disable
at the top of a file.
It would be handy to extend tidypy's noqa syntax to work this way too.
I'll have a go at setting this up unless there's an objection.
Experiment with having TidyPy use multiple processes rather than multiple threads when executing tools.
Hi,
This project looks super interesting. Unfortunately, I tried installing and running it, and it seems that tidypy
has some conflicting dependencies/sub-dependencies.
Any advice would be greatly appreciated!
aa:~/git/repo [branch]$ rmvirtualenv repo
Removing repo...
aa:~/git/repo [branch]$ mkvirtualenv repo
Using base prefix '/Library/Frameworks/Python.framework/Versions/3.7'
New python executable in /Users/aa/.virtualenvs/repo/bin/python3.7
Also creating executable in /Users/aa/.virtualenvs/repo/bin/python
Installing setuptools, pip, wheel...workon done.
dvirtualenvwrapper.user_scripts creating /Users/aa/.virtualenvs/repo/bin/predeactivate
virtualenvwrapper.user_scripts creating /Users/aa/.virtualenvs/repo/bin/postdeactivate
virtualenvwrapper.user_scripts creating /Users/aa/.virtualenvs/repo/bin/preactivate
virtualenvwrapper.user_scripts creating /Users/aa/.virtualenvs/repo/bin/postactivate
virtualenvwrapper.user_scripts creating /Users/aa/.virtualenvs/repo/bin/get_env_details
ig aa:~/git/repo [branch]$ workon repo
aa:~/git/repo [branch]$ which python
/Users/aa/.virtualenvs/repo/bin/python
aa:~/git/repo [branch]$ pip list
piPackage Version
---------- -------
pip 18.1
setuptools 40.4.3
wheel 0.32.2
p aa:~/git/repo [branch]$ pip install tidypy
Collecting tidypy
Using cached https://files.pythonhosted.org/packages/80/ef/4d74ccf0db57ee619cede7c4672d59551b4d0bf283a4fd7fa7877443a514/tidypy-0.6.0-py2.py3-none-any.whl
Collecting tqdm<5,>=4.11 (from tidypy)
Using cached https://files.pythonhosted.org/packages/91/55/8cb23a97301b177e9c8e3226dba45bb454411de2cbd25746763267f226c2/tqdm-4.28.1-py2.py3-none-any.whl
Collecting pydiatra<0.13,>=0.12.2 (from tidypy)
Collecting basicserial<0.2,>=0.1 (from tidypy)
Using cached https://files.pythonhosted.org/packages/80/6f/0da8ffa2fc03f122539cc42581e1736c98fb5021d7e362e7911b77e27494/basicserial-0.1.0-py2.py3-none-any.whl
Collecting pyroma<3,>=2.2 (from tidypy)
Using cached https://files.pythonhosted.org/packages/63/26/6a894d85cd510ed59c991d4b64d025308e1ee1294251e88aadbdd5659c0b/pyroma-2.4-py2.py3-none-any.whl
Collecting detect-secrets<0.11,>=0.9.1 (from tidypy)
Using cached https://files.pythonhosted.org/packages/57/03/db1ea045e762b4f7269653549225332eb48c9199876f094d190c3efd8968/detect_secrets-0.10.4-py2.py3-none-any.whl
Collecting pyyaml<5,>=3.12 (from tidypy)
Collecting check-manifest<0.38,>=0.37 (from tidypy)
Using cached https://files.pythonhosted.org/packages/7a/6a/a723e3a5b2844f47a522013738fea914c9f68d1ef576c97238409bd42e84/check_manifest-0.37-py2.py3-none-any.whl
Collecting pyflakes<1.7,>=1.5 (from tidypy)
Using cached https://files.pythonhosted.org/packages/d7/40/733bcc64da3161ae4122c11e88269f276358ca29335468005cb0ee538665/pyflakes-1.6.0-py2.py3-none-any.whl
Collecting restructuredtext-lint<2,>=1.1 (from tidypy)
Collecting dennis<1,>=0.9 (from tidypy)
Using cached https://files.pythonhosted.org/packages/2d/2e/2cb43a5e787387b558d2eeefc2713305d2df97c4622cee37b1e6f5505031/dennis-0.9-py2.py3-none-any.whl
Collecting click<8,>=6 (from tidypy)
Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Collecting vulture<0.30,>=0.25 (from tidypy)
Using cached https://files.pythonhosted.org/packages/1b/40/92d0b666eaa19bd5aa81a5fc066841f43e7ff140b17eaababb27c5782b4d/vulture-0.29-py2.py3-none-any.whl
Collecting demjson<3,>=2.2.4 (from tidypy)
Collecting six (from tidypy)
Using cached https://files.pythonhosted.org/packages/67/4b/141a581104b1f6397bfa78ac9d43d8ad29a7ca43ea90a2d863fe3056e86a/six-1.11.0-py2.py3-none-any.whl
Collecting pytoml<0.2,>=0.1 (from tidypy)
Collecting pydocstyle<3,>=2 (from tidypy)
Using cached https://files.pythonhosted.org/packages/43/8a/f1141af0c8406788a5c38ad5001d4163d903b5384a6517239d2ac42734c8/pydocstyle-2.1.1-py3-none-any.whl
Collecting pycodestyle<2.4,>=2.3 (from tidypy)
Using cached https://files.pythonhosted.org/packages/e4/81/78fe51eb4038d1388b7217dd63770b0f428370207125047312886c923b26/pycodestyle-2.3.1-py2.py3-none-any.whl
Collecting yamllint<2,>=1.8 (from tidypy)
Using cached https://files.pythonhosted.org/packages/c5/9c/2d1977d1898caf4133dab2b3a9668e3437d96a3ce09979bc996dfcd231e9/yamllint-1.12.1-py2.py3-none-any.whl
Collecting pep8-naming<0.8,>=0.4 (from tidypy)
Using cached https://files.pythonhosted.org/packages/39/bb/a34544c789e7e5458ed2db6cbd1c8e227bb01e4ce03a0b15ec4ec93e486d/pep8_naming-0.7.0-py2.py3-none-any.whl
Collecting pylint<2.2,>=2; python_version >= "3.4" (from tidypy)
Using cached https://files.pythonhosted.org/packages/6e/c2/1e97c238877b6a86562d32297eb33a6670b6220e8ec0ca85f67b66dc893f/pylint-2.1.1-py3-none-any.whl
Collecting requests<3,>=2 (from tidypy)
Downloading https://files.pythonhosted.org/packages/f1/ca/10332a30cb25b627192b4ea272c351bce3ca1091e541245cccbace6051d8/requests-2.20.0-py2.py3-none-any.whl (60kB)
100% |████████████████████████████████| 61kB 1.2MB/s
Collecting bandit<2,>=1.4 (from tidypy)
Using cached https://files.pythonhosted.org/packages/da/94/34afbe0c28b0c35f5116955c86c20599b3c732ddc1b2c452f190760ebfbf/bandit-1.5.1-py2.py3-none-any.whl
Collecting mccabe<0.7,>=0.6 (from tidypy)
Using cached https://files.pythonhosted.org/packages/87/89/479dc97e18549e21354893e4ee4ef36db1d237534982482c3681ee6e7b57/mccabe-0.6.1-py2.py3-none-any.whl
Collecting iso8601 (from basicserial<0.2,>=0.1->tidypy)
Using cached https://files.pythonhosted.org/packages/ef/57/7162609dab394d38bbc7077b7ba0a6f10fb09d8b7701ea56fa1edc0c4345/iso8601-0.1.12-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /Users/aa/.virtualenvs/repo/lib/python3.7/site-packages (from pyroma<3,>=2.2->tidypy) (40.4.3)
Collecting docutils (from pyroma<3,>=2.2->tidypy)
Using cached https://files.pythonhosted.org/packages/36/fa/08e9e6e0e3cbd1d362c3bbee8d01d0aedb2155c4ac112b19ef3cae8eed8d/docutils-0.14-py3-none-any.whl
Collecting unidiff (from detect-secrets<0.11,>=0.9.1->tidypy)
Using cached https://files.pythonhosted.org/packages/68/52/c7278fc3c17d1aaade84597968d88f97f0f4ec7288ddedb6970a341c5170/unidiff-0.5.5-py2.py3-none-any.whl
Collecting polib>=1.0.8 (from dennis<1,>=0.9->tidypy)
Using cached https://files.pythonhosted.org/packages/30/a2/e407c3b00cace3d7fc8df14d364deeecfeb96044e1a317de583bc26eae58/polib-1.1.0-py2.py3-none-any.whl
Collecting snowballstemmer (from pydocstyle<3,>=2->tidypy)
Using cached https://files.pythonhosted.org/packages/d4/6c/8a935e2c7b54a37714656d753e4187ee0631988184ed50c0cf6476858566/snowballstemmer-1.2.1-py2.py3-none-any.whl
Collecting pathspec>=0.5.3 (from yamllint<2,>=1.8->tidypy)
Collecting flake8-polyfill<2,>=1.0.2 (from pep8-naming<0.8,>=0.4->tidypy)
Using cached https://files.pythonhosted.org/packages/86/b5/a43fed6fd0193585d17d6faa7b85317d4461f694aaed546098c69f856579/flake8_polyfill-1.0.2-py2.py3-none-any.whl
Collecting astroid>=2.0.0 (from pylint<2.2,>=2; python_version >= "3.4"->tidypy)
Using cached https://files.pythonhosted.org/packages/19/92/6f6d3591c429dbdb31c18d8476ba1af08d5973d7cc09f66346109e9de7fb/astroid-2.0.4-py3-none-any.whl
Collecting isort>=4.2.5 (from pylint<2.2,>=2; python_version >= "3.4"->tidypy)
Using cached https://files.pythonhosted.org/packages/1f/2c/22eee714d7199ae0464beda6ad5fedec8fee6a2f7ffd1e8f1840928fe318/isort-4.3.4-py3-none-any.whl
Collecting idna<2.8,>=2.5 (from requests<3,>=2->tidypy)
Using cached https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl
Collecting urllib3<1.25,>=1.21.1 (from requests<3,>=2->tidypy)
Downloading https://files.pythonhosted.org/packages/8c/4b/5cbc4cb46095f369117dcb751821e1bef9dd86a07c968d8757e9204c324c/urllib3-1.24-py2.py3-none-any.whl (117kB)
100% |████████████████████████████████| 122kB 2.1MB/s
Collecting certifi>=2017.4.17 (from requests<3,>=2->tidypy)
Using cached https://files.pythonhosted.org/packages/56/9d/1d02dd80bc4cd955f98980f28c5ee2200e1209292d5f9e9cc8d030d18655/certifi-2018.10.15-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests<3,>=2->tidypy)
Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting GitPython>=1.0.1 (from bandit<2,>=1.4->tidypy)
Using cached https://files.pythonhosted.org/packages/fe/e5/fafe827507644c32d6dc553a1c435cdf882e0c28918a5bab29f7fbebfb70/GitPython-2.1.11-py2.py3-none-any.whl
Collecting stevedore>=1.20.0 (from bandit<2,>=1.4->tidypy)
Using cached https://files.pythonhosted.org/packages/35/fa/8683fab2a6e15ecfe107996e56fab91e52fe3ec0b40ca9440a0e1ffe6892/stevedore-1.30.0-py2.py3-none-any.whl
Collecting flake8 (from flake8-polyfill<2,>=1.0.2->pep8-naming<0.8,>=0.4->tidypy)
Using cached https://files.pythonhosted.org/packages/34/a6/49e2849a0e5464e1b5d621f63bc8453066f0f367bb3b744a33fca0bc1ddd/flake8-3.6.0-py2.py3-none-any.whl
Collecting wrapt (from astroid>=2.0.0->pylint<2.2,>=2; python_version >= "3.4"->tidypy)
Collecting lazy-object-proxy (from astroid>=2.0.0->pylint<2.2,>=2; python_version >= "3.4"->tidypy)
Collecting gitdb2>=2.0.0 (from GitPython>=1.0.1->bandit<2,>=1.4->tidypy)
Using cached https://files.pythonhosted.org/packages/da/30/a407568aa8d8f25db817cf50121a958722f3fc5f87e3a6fba1f40c0633e3/gitdb2-2.0.5-py2.py3-none-any.whl
Collecting pbr!=2.1.0,>=2.0.0 (from stevedore>=1.20.0->bandit<2,>=1.4->tidypy)
Using cached https://files.pythonhosted.org/packages/76/0c/304d968fe010ba7c2ecc1d57e28741ddd3a305439dcf1cdb3b6f896a3c00/pbr-5.1.0-py2.py3-none-any.whl
Collecting smmap2>=2.0.0 (from gitdb2>=2.0.0->GitPython>=1.0.1->bandit<2,>=1.4->tidypy)
Using cached https://files.pythonhosted.org/packages/55/d2/866d45e3a121ee15a1dc013824d58072fd5c7799c9c34d01378eb262ca8f/smmap2-2.0.5-py2.py3-none-any.whl
flake8 3.6.0 has requirement pycodestyle<2.5.0,>=2.4.0, but you'll have pycodestyle 2.3.1 which is incompatible.
flake8 3.6.0 has requirement pyflakes<2.1.0,>=2.0.0, but you'll have pyflakes 1.6.0 which is incompatible.
Installing collected packages: tqdm, pydiatra, iso8601, six, basicserial, docutils, pyroma, unidiff, pyyaml, detect-secrets, check-manifest, pyflakes, restructuredtext-lint, polib, click, dennis, vulture, demjson, pytoml, snowballstemmer, pydocstyle, pycodestyle, pathspec, yamllint, mccabe, flake8, flake8-polyfill, pep8-naming, wrapt, lazy-object-proxy, astroid, isort, pylint, idna, urllib3, certifi, chardet, requests, smmap2, gitdb2, GitPython, pbr, stevedore, bandit, tidypy
tidypySuccessfully installed GitPython-2.1.11 astroid-2.0.4 bandit-1.5.1 basicserial-0.1.0 certifi-2018.10.15 chardet-3.0.4 check-manifest-0.37 click-7.0 demjson-2.2.4 dennis-0.9 detect-secrets-0.10.4 docutils-0.14 flake8-3.6.0 flake8-polyfill-1.0.2 gitdb2-2.0.5 idna-2.7 iso8601-0.1.12 isort-4.3.4 lazy-object-proxy-1.3.1 mccabe-0.6.1 pathspec-0.5.9 pbr-5.1.0 pep8-naming-0.7.0 polib-1.1.0 pycodestyle-2.3.1 pydiatra-0.12.4 pydocstyle-2.1.1 pyflakes-1.6.0 pylint-2.1.1 pyroma-2.4 pytoml-0.1.19 pyyaml-3.13 requests-2.20.0 restructuredtext-lint-1.1.3 six-1.11.0 smmap2-2.0.5 snowballstemmer-1.2.1 stevedore-1.30.0 tidypy-0.6.0 tqdm-4.28.1 unidiff-0.5.5 urllib3-1.24 vulture-0.29 wrapt-1.10.11 yamllint-1.12.1
aa:~/git/repo [branch]$ tidypy
Traceback (most recent call last):
File "/Users/aa/.virtualenvs/repo/bin/tidypy", line 7, in <module>
from tidypy.cli import main
File "/Users/aa/.virtualenvs/repo/lib/python3.7/site-packages/tidypy/cli.py", line 66, in <module>
for name, cls in iteritems(get_tools())
File "/Users/aa/.virtualenvs/repo/lib/python3.7/site-packages/tidypy/config.py", line 35, in get_tools
get_tools._CACHE[entry.name] = entry.load()
File "/Users/aa/.virtualenvs/repo/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2331, in load
self.require(*args, **kwargs)
File "/Users/aa/.virtualenvs/repo/lib/python3.7/site-packages/pkg_resources/__init__.py", line 2354, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "/Users/aa/.virtualenvs/repo/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (pycodestyle 2.3.1 (/Users/aa/.virtualenvs/repo/lib/python3.7/site-packages), Requirement.parse('pycodestyle<2.5.0,>=2.4.0'), {'flake8'})```
The complaints are dumped to stdout instead of coming up as an issue.
Should add support to make using TidyPy in git and mercurial hooks easy. Flake8 has a decent approach -- look there for inspiration.
The Configuration section of the README currently says "TODO", and the command tidypy default-config
doesn't even tell me what filename to use for the config it prints to stdout.
How do I make a config file for tidypy? At least document the filename it's looking for.
If you hit ctrl-C while TidyPy is running, it gets stuck and sends the CPU to 100%. Not good.
Need to add documentation (docstrings, readme) for all the classes/functions considered to be the "public" API.
It seems that Vulture 1.5 (released 2020-05-24) has broken TidyPy.
1 vulture: Unexpected exception:
Traceback (most recent call last):
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/tidypy/core.py", line 53, in run
issues = impl.execute(finder)
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/tidypy/tools/vulture.py", line 130, in execute
self.vulture.scavenge(finder)
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/tidypy/tools/vulture.py", line 58, in scavenge
self.scan(source, filename=filepath)
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/tidypy/tools/vulture.py", line 73, in scan
self.visit(node)
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/vulture/core.py", line 629, in visit
return self.generic_visit(node)
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/vulture/core.py", line 663, in generic_visit
self.visit(item)
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/vulture/core.py", line 628, in visit
visitor(node)
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/vulture/core.py", line 573, in visit_FunctionDef
self._define(
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/vulture/core.py", line 497, in _define
if ignored(first_lineno):
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/vulture/core.py", line 490, in ignored
or noqa.ignore_line(self.noqa_lines, lineno, ERROR_CODES[typ])
AttributeError: 'TidyPyVulture' object has no attribute 'noqa_lines'
(tidypy:tool)
This change in Vulture added a new attribute noqa_lines
to the Vulture.scan()
method, which is unfortunately copy-pasted into TidyPyVulture, which is now out of date.
$ mkdir src
$ echo 'if True: X = 1' > src/run.py
$ python3 -V
Python 3.8.0
$ python3 -m venv venv
$ ./venv/bin/pip3 install tidypy
Collecting tidypy
Using cached https://files.pythonhosted.org/packages/c9/4f/78b8287c188a092fd6453f0f6786b7f33103c8a602fd95fe02b41e263806/tidypy-0.14.0-py3-none-any.whl
Collecting pydocstyle<6,>=4 (from tidypy)
Using cached https://files.pythonhosted.org/packages/cc/fb/0662498401c663606ef35b4ec6a0aca6b4121d6da8c3ac40a4e68f6ac521/pydocstyle-5.0.2-py3-none-any.whl
Collecting basicserial<2.0,>=0.1 (from tidypy)
Using cached https://files.pythonhosted.org/packages/6e/52/e619e85211cad107dd002f0060ae158c48411c272f99acaef611a6678e86/basicserial-1.1.0-py3-none-any.whl
Collecting click<8,>=6 (from tidypy)
Using cached https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whl
Collecting restructuredtext-lint<2,>=1.1 (from tidypy)
Using cached https://files.pythonhosted.org/packages/36/a6/507be0d9125cd37530e96062b7f838ee1777a0e30855197964603da7b990/restructuredtext_lint-1.3.1.tar.gz
Collecting pylint<2.6,>=2 (from tidypy)
Using cached https://files.pythonhosted.org/packages/e8/fb/734960c55474c8f74e6ad4c8588fc44073fb9d69e223269d26a3c2435d16/pylint-2.5.3-py3-none-any.whl
Collecting bandit<2,>=1.4 (from tidypy)
Using cached https://files.pythonhosted.org/packages/5a/50/ff2f2c8f1f0ca1569f678eeb608c0f973b835985410985594fbee96be820/bandit-1.6.2-py2.py3-none-any.whl
Collecting detect-secrets<0.14,>=0.11.3 (from tidypy)
Using cached https://files.pythonhosted.org/packages/15/95/f6bada839f3446f6e279bcf7675eae6ec456b652617fbaaad70642f6d3e5/detect_secrets-0.13.1-py2.py3-none-any.whl
Collecting check-manifest<0.42,>=0.37 (from tidypy)
Using cached https://files.pythonhosted.org/packages/54/40/7faf80474b21b3bd3f97465a31c3204379827379c5017f5cc703eee576ec/check_manifest-0.41-py2.py3-none-any.whl
Collecting requests<3,>=2 (from tidypy)
Using cached https://files.pythonhosted.org/packages/45/1e/0c169c6a5381e241ba7404532c16a21d86ab872c9bed8bdcd4c423954103/requests-2.24.0-py2.py3-none-any.whl
Collecting tqdm<5,>=4.11 (from tidypy)
Using cached https://files.pythonhosted.org/packages/46/62/7663894f67ac5a41a0d8812d78d9d2a9404124051885af9d77dc526fb399/tqdm-4.47.0-py2.py3-none-any.whl
Collecting pycodestyle<2.7,>=2.4 (from tidypy)
Using cached https://files.pythonhosted.org/packages/10/5b/88879fb861ab79aef45c7e199cae3ef7af487b5603dcb363517a50602dd7/pycodestyle-2.6.0-py2.py3-none-any.whl
Collecting pyyaml<6,>=3.12 (from tidypy)
Using cached https://files.pythonhosted.org/packages/64/c2/b80047c7ac2478f9501676c988a5411ed5572f35d1beff9cae07d321512c/PyYAML-5.3.1.tar.gz
Collecting toml<0.11,>=0.10 (from tidypy)
Using cached https://files.pythonhosted.org/packages/9f/e1/1b40b80f2e1663a6b9f497123c11d7d988c0919abbf3c3f2688e448c5363/toml-0.10.1-py2.py3-none-any.whl
Collecting pep8-naming<0.11,>=0.4 (from tidypy)
Using cached https://files.pythonhosted.org/packages/5b/69/6018efb8ae18bd5a05f5f447666060a44aa8fe017f439c50fe8c8bd990cf/pep8_naming-0.10.0-py2.py3-none-any.whl
Collecting mccabe<0.7,>=0.6 (from tidypy)
Using cached https://files.pythonhosted.org/packages/87/89/479dc97e18549e21354893e4ee4ef36db1d237534982482c3681ee6e7b57/mccabe-0.6.1-py2.py3-none-any.whl
Collecting pydiatra<0.13,>=0.12.2 (from tidypy)
Using cached https://files.pythonhosted.org/packages/43/83/5717f46f837ebc40414f6f0342534c9ddf9c9abd0455ab708cb93b021d76/pydiatra-0.12.5.tar.gz
Collecting eradicate<2,>=1 (from tidypy)
Using cached https://files.pythonhosted.org/packages/65/ed/5b4506e122114f9439482d2a810ade4aa06cc4e306185931889e58b47f46/eradicate-1.0.tar.gz
Collecting pyflakes<2.3,>=1.5 (from tidypy)
Using cached https://files.pythonhosted.org/packages/69/5b/fd01b0c696f2f9a6d2c839883b642493b431f28fa32b29abc465ef675473/pyflakes-2.2.0-py2.py3-none-any.whl
Collecting vulture<2,>=1.1 (from tidypy)
Using cached https://files.pythonhosted.org/packages/b4/6a/df844d624e1e1f8a01873268850ac0976bf930164bfca141c103d39308ce/vulture-1.5-py2.py3-none-any.whl
Collecting pyroma<3,>=2.2 (from tidypy)
Using cached https://files.pythonhosted.org/packages/74/67/9f162a493011a3235761ea980a5ead7de189fb40c955da7555e7c82e2b20/pyroma-2.6-py2.py3-none-any.whl
Collecting dennis<1,>=0.9 (from tidypy)
Using cached https://files.pythonhosted.org/packages/2d/2e/2cb43a5e787387b558d2eeefc2713305d2df97c4622cee37b1e6f5505031/dennis-0.9-py2.py3-none-any.whl
Collecting demjson<3,>=2.2.4 (from tidypy)
Using cached https://files.pythonhosted.org/packages/96/67/6db789e2533158963d4af689f961b644ddd9200615b8ce92d6cad695c65a/demjson-2.2.4.tar.gz
Collecting yamllint<2,>=1.8 (from tidypy)
Using cached https://files.pythonhosted.org/packages/9e/e5/1895d308f95e44104472205df81dd6e68f326d4887c7502b90436c5bc91e/yamllint-1.23.0-py2.py3-none-any.whl
Collecting dlint<0.11,>=0.8 (from tidypy)
Using cached https://files.pythonhosted.org/packages/cb/78/9a3fb63fe943d3c8d47d3fdcabcfa8ed2bbe4de80eb95d550bcdb4735342/dlint-0.10.3-py2.py3-none-any.whl
Collecting snowballstemmer (from pydocstyle<6,>=4->tidypy)
Using cached https://files.pythonhosted.org/packages/7d/4b/cdf1113a0e88b641893b814e9c36f69a6fda28cd88b62c7f0d858cde3166/snowballstemmer-2.0.0-py2.py3-none-any.whl
Collecting iso8601 (from basicserial<2.0,>=0.1->tidypy)
Using cached https://files.pythonhosted.org/packages/ef/57/7162609dab394d38bbc7077b7ba0a6f10fb09d8b7701ea56fa1edc0c4345/iso8601-0.1.12-py2.py3-none-any.whl
Collecting docutils<1.0,>=0.11 (from restructuredtext-lint<2,>=1.1->tidypy)
Using cached https://files.pythonhosted.org/packages/81/44/8a15e45ffa96e6cf82956dd8d7af9e666357e16b0d93b253903475ee947f/docutils-0.16-py2.py3-none-any.whl
Collecting astroid<=2.5,>=2.4.0 (from pylint<2.6,>=2->tidypy)
Using cached https://files.pythonhosted.org/packages/24/a8/5133f51967fb21e46ee50831c3f5dda49e976b7f915408d670b1603d41d6/astroid-2.4.2-py3-none-any.whl
Collecting isort<5,>=4.2.5 (from pylint<2.6,>=2->tidypy)
Using cached https://files.pythonhosted.org/packages/e5/b0/c121fd1fa3419ea9bfd55c7f9c4fedfec5143208d8c7ad3ce3db6c623c21/isort-4.3.21-py2.py3-none-any.whl
Collecting stevedore>=1.20.0 (from bandit<2,>=1.4->tidypy)
Using cached https://files.pythonhosted.org/packages/45/62/aa4c77e0f0899b7697445d8126fd099473452488d70f877426812c2ce982/stevedore-2.0.1-py3-none-any.whl
Collecting six>=1.10.0 (from bandit<2,>=1.4->tidypy)
Using cached https://files.pythonhosted.org/packages/ee/ff/48bde5c0f013094d729fe4b0316ba2a24774b3ff1c52d924a8a4cb04078a/six-1.15.0-py2.py3-none-any.whl
Collecting GitPython>=1.0.1 (from bandit<2,>=1.4->tidypy)
Using cached https://files.pythonhosted.org/packages/8c/f9/c315aa88e51fabdc08e91b333cfefb255aff04a2ee96d632c32cb19180c9/GitPython-3.1.3-py3-none-any.whl
Collecting pep517 (from check-manifest<0.42,>=0.37->tidypy)
Using cached https://files.pythonhosted.org/packages/43/f6/4af3567c136e8e1620f6fcff665f9a478e68d06f9c990d0f2717cf9a2b8c/pep517-0.8.2-py2.py3-none-any.whl
Collecting chardet<4,>=3.0.2 (from requests<3,>=2->tidypy)
Using cached https://files.pythonhosted.org/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl
Collecting idna<3,>=2.5 (from requests<3,>=2->tidypy)
Using cached https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests<3,>=2->tidypy)
Using cached https://files.pythonhosted.org/packages/5e/c4/6c4fe722df5343c33226f0b4e0bb042e4dc13483228b4718baf286f86d87/certifi-2020.6.20-py2.py3-none-any.whl
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 (from requests<3,>=2->tidypy)
Using cached https://files.pythonhosted.org/packages/e1/e5/df302e8017440f111c11cc41a6b432838672f5a70aa29227bf58149dc72f/urllib3-1.25.9-py2.py3-none-any.whl
Collecting flake8-polyfill<2,>=1.0.2 (from pep8-naming<0.11,>=0.4->tidypy)
Using cached https://files.pythonhosted.org/packages/86/b5/a43fed6fd0193585d17d6faa7b85317d4461f694aaed546098c69f856579/flake8_polyfill-1.0.2-py2.py3-none-any.whl
Requirement already satisfied: setuptools in ./venv/lib/python3.8/site-packages (from pyroma<3,>=2.2->tidypy) (41.2.0)
Collecting pygments (from pyroma<3,>=2.2->tidypy)
Using cached https://files.pythonhosted.org/packages/2d/68/106af3ae51daf807e9cdcba6a90e518954eb8b70341cee52995540a53ead/Pygments-2.6.1-py3-none-any.whl
Collecting polib>=1.0.8 (from dennis<1,>=0.9->tidypy)
Using cached https://files.pythonhosted.org/packages/30/a2/e407c3b00cace3d7fc8df14d364deeecfeb96044e1a317de583bc26eae58/polib-1.1.0-py2.py3-none-any.whl
Collecting pathspec>=0.5.3 (from yamllint<2,>=1.8->tidypy)
Using cached https://files.pythonhosted.org/packages/5d/d0/887c58853bd4b6ffc7aa9cdba4fc57d7b979b45888a6bd47e4568e1cf868/pathspec-0.8.0-py2.py3-none-any.whl
Collecting flake8<4.0.0,>=3.6.0 (from dlint<0.11,>=0.8->tidypy)
Using cached https://files.pythonhosted.org/packages/6c/20/6326a9a0c6f0527612bae748c4c03df5cd69cf06dfb2cf59d85c6e165a6a/flake8-3.8.3-py2.py3-none-any.whl
Collecting wrapt~=1.11 (from astroid<=2.5,>=2.4.0->pylint<2.6,>=2->tidypy)
Collecting lazy-object-proxy==1.4.* (from astroid<=2.5,>=2.4.0->pylint<2.6,>=2->tidypy)
Using cached https://files.pythonhosted.org/packages/34/8c/74acd0ad5a0518be9e0f3b4d022e84da0c1d9b78972afce73259ac85d78b/lazy_object_proxy-1.4.3-cp38-cp38-manylinux1_x86
_64.whl
Collecting pbr!=2.1.0,>=2.0.0 (from stevedore>=1.20.0->bandit<2,>=1.4->tidypy)
Using cached https://files.pythonhosted.org/packages/96/ba/aa953a11ec014b23df057ecdbc922fdb40ca8463466b1193f3367d2711a6/pbr-5.4.5-py2.py3-none-any.whl
Collecting gitdb<5,>=4.0.1 (from GitPython>=1.0.1->bandit<2,>=1.4->tidypy)
Using cached https://files.pythonhosted.org/packages/48/11/d1800bca0a3bae820b84b7d813ad1eff15a48a64caea9c823fc8c1b119e8/gitdb-4.0.5-py3-none-any.whl
Collecting smmap<4,>=3.0.1 (from gitdb<5,>=4.0.1->GitPython>=1.0.1->bandit<2,>=1.4->tidypy)
Using cached https://files.pythonhosted.org/packages/b0/9a/4d409a6234eb940e6a78dfdfc66156e7522262f5f2fecca07dc55915952d/smmap-3.0.4-py2.py3-none-any.whl
Installing collected packages: snowballstemmer, pydocstyle, iso8601, basicserial, click, docutils, restructuredtext-lint, mccabe, six, wrapt, lazy-object-proxy, astroid,
isort, toml, pylint, pbr, stevedore, pyyaml, smmap, gitdb, GitPython, bandit, chardet, idna, certifi, urllib3, requests, detect-secrets, pep517, check-manifest, tqdm, pyc
odestyle, pyflakes, flake8, flake8-polyfill, pep8-naming, pydiatra, eradicate, vulture, pygments, pyroma, polib, dennis, demjson, pathspec, yamllint, dlint, tidypy
Running setup.py install for restructuredtext-lint: started
Running setup.py install for restructuredtext-lint: finished with status 'done'
Running setup.py install for pyyaml: started
Running setup.py install for pyyaml: finished with status 'done'
Running setup.py install for pydiatra: started
Running setup.py install for pydiatra: finished with status 'done'
Running setup.py install for eradicate: started
Running setup.py install for eradicate: finished with status 'done'
Running setup.py install for demjson: started
Running setup.py install for demjson: finished with status 'done'
Successfully installed GitPython-3.1.3 astroid-2.4.2 bandit-1.6.2 basicserial-1.1.0 certifi-2020.6.20 chardet-3.0.4 check-manifest-0.41 click-7.1.2 demjson-2.2.4 dennis-0
.9 detect-secrets-0.13.1 dlint-0.10.3 docutils-0.16 eradicate-1.0 flake8-3.8.3 flake8-polyfill-1.0.2 gitdb-4.0.5 idna-2.10 iso8601-0.1.12 isort-4.3.21 lazy-object-proxy-1
.4.3 mccabe-0.6.1 pathspec-0.8.0 pbr-5.4.5 pep517-0.8.2 pep8-naming-0.10.0 polib-1.1.0 pycodestyle-2.6.0 pydiatra-0.12.5 pydocstyle-5.0.2 pyflakes-2.2.0 pygments-2.6.1 py
lint-2.5.3 pyroma-2.6 pyyaml-5.3.1 requests-2.24.0 restructuredtext-lint-1.3.1 six-1.15.0 smmap-3.0.4 snowballstemmer-2.0.0 stevedore-2.0.1 tidypy-0.14.0 toml-0.10.1 tqdm
-4.47.0 urllib3-1.25.9 vulture-1.5 wrapt-1.12.1 yamllint-1.23.0
WARNING: You are using pip version 19.2.3, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
$ (cd src && ../venv/bin/tidypy check)
Analyzing |██▉ | 29% [00:00, current=bandit,eradicate,polint,pycodestyle]
Analyzing |███████ | 71% [00:00, current=pycodestyle,pylint,sec,pylint,secrets]
Analyzing |██████████| 100% [00:00]
Analyzing |██████████| 100% [00:00]. (1)
1 vulture: Unexpected exception:
Traceback (most recent call last):
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/tidypy/core.py", line 53, in run
issues = impl.execute(finder)
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/tidypy/tools/vulture.py", line 130, in execute
self.vulture.scavenge(finder)
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/tidypy/tools/vulture.py", line 58, in scavenge
self.scan(source, filename=filepath)
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/tidypy/tools/vulture.py", line 73, in scan
self.visit(node)
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/vulture/core.py", line 629, in visit
return self.generic_visit(node)
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/vulture/core.py", line 663, in generic_visit
self.visit(item)
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/vulture/core.py", line 628, in visit
visitor(node)
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/vulture/core.py", line 585, in visit_If
self._handle_conditional_node(node, "if")
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/vulture/core.py", line 435, in _handle_conditional_node
self._define(
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/vulture/core.py", line 497, in _define
if ignored(first_lineno):
File "/home/sjohnson/python-play/venv/lib/python3.8/site-packages/vulture/core.py", line 490, in ignored
or noqa.ignore_line(self.noqa_lines, lineno, ERROR_CODES[typ])
AttributeError: 'TidyPyVulture' object has no attribute 'noqa_lines'
(tidypy:tool)
run.py (5)
1 Missing docstring in public module (pydocstyle:D100)
1 Missing module docstring (pylint:missing-module-docstring)
1 Using a conditional statement with a constant value (pylint:using-constant-test)
1:8 multiple statements on one line (colon) (pycodestyle:E701)
1:10 More than one statement on a single line (pylint:multiple-statements)
✗ 6 issues found.
Occasionally pylint
dumps a message like the following to stdout/stderr. It still appears to work and find issues, but the output disrupts TidyPy's output.
Problem importing module async.py: Unable to find module for [...]/lib/python2.7/site-packages/pylint/checkers/async.py in [..., ..., ...]
Pylint seems to associate any duplicate-code issues it finds with the last files it touches. TidyPy should parse the issue and report it against the correct file(s).
Is there any reason why the new version isn't up on docker hub? Thanks!
Make a tool that wraps the functionality of lib2to3.
The pylint tool doesn't respect the "exclude" configuration for a project.
Config:
[yamllint]
use = true
filters = ["\\.yaml$", "\\.yml$",]
disabled = [
"line-length",
"document-start",
]
[yamllint.options]
key-ordering = "enable"
Error:
1 yamllint: Unexpected exception:
Traceback (most recent call last):
File "/Users/Pablo/workspace/novum-tests/lib/python3.9/site-packages/yamllint/config.py", line 77, in parse
conf = yaml.safe_load(raw_content)
File "/Users/Pablo/workspace/novum-tests/lib/python3.9/site-packages/yaml/__init__.py", line 162, in safe_load
return load(stream, SafeLoader)
File "/Users/Pablo/workspace/novum-tests/lib/python3.9/site-packages/yaml/__init__.py", line 114, in load
return loader.get_single_data()
File "/Users/Pablo/workspace/novum-tests/lib/python3.9/site-packages/yaml/constructor.py", line 41, in get_single_data
node = self.get_single_node()
File "/Users/Pablo/workspace/novum-tests/lib/python3.9/site-packages/yaml/composer.py", line 39, in get_single_node
if not self.check_event(StreamEndEvent):
File "/Users/Pablo/workspace/novum-tests/lib/python3.9/site-packages/yaml/parser.py", line 98, in check_event
self.current_event = self.state()
File "/Users/Pablo/workspace/novum-tests/lib/python3.9/site-packages/yaml/parser.py", line 171, in parse_document_start
raise ParserError(None, None,
yaml.parser.ParserError: expected '<document start>', but found '<block mapping start>'
in "<unicode string>", line 6, column 3:
line-length: disable
^
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/Pablo/workspace/novum-tests/lib/python3.9/site-packages/tidypy/core.py", line 53, in run
issues = impl.execute(finder)
File "/Users/Pablo/workspace/novum-tests/lib/python3.9/site-packages/tidypy/tools/yamllint.py", line 73, in execute
cfg = self.make_config()
File "/Users/Pablo/workspace/novum-tests/lib/python3.9/site-packages/tidypy/tools/yamllint.py", line 69, in make_config
return YamlLintConfig(cfg)
File "/Users/Pablo/workspace/novum-tests/lib/python3.9/site-packages/yamllint/config.py", line 44, in __init__
self.parse(content)
File "/Users/Pablo/workspace/novum-tests/lib/python3.9/site-packages/yamllint/config.py", line 79, in parse
raise YamlLintConfigError('invalid config: %s' % e)
yamllint.config.YamlLintConfigError: invalid config: expected '<document start>', but found '<block mapping start>'
in "<unicode string>", line 6, column 3:
line-length: disable
^
(tidypy:tool)
I also tried this, with the same result:
[yamllint]
use = true
filters = ["\\.yaml$", "\\.yml$",]
[yamllint.options]
key-ordering = "enable"
line-length = "disable"
document-start "disable"
Set up CI (with AppVeyor, or similar) to test TidyPy on Windows.
It would be really nice to have the 0.8 version published and uploaded on pypi, thanks!
David
I try to use tidypy in Jenkins pipeline, pylint reporting. Jenkins expect format: {path}:{line}: [{msg_id}({symbol}), {obj}] {msg}
tidypy use format '{type}:{line:>3},{character:>2}: {message} ({code}@{tool})'
I think it's pretty simple to add configurable reporting formatter.
The rstlint tool should automatically recognize/handle Sphinx directives. They're very commonly used, and the base restructuredtext-lint package we're using doesn't recognize them.
Not every tool supports the pseudo-standard of "noqa" to ignore issues on a line. Should implement it within TidyPy itself.
Should include a --disable-noqa
option and forward it along to any tool that supports the notion.
No good reason TidyPy can't or shouldn't work on Python 3. Hasn't really been tested yet. Will probably need to enable/disable tools based on their support for Py3K. Will probably also want to optionally install them via extras_require
to only install tools that we know to work.
I created this feature request to have tidypy included in the vscode python extension. Give it a 👍
Occasionally rstlint
will dump to stdout/stderr when it finds issues. Need to figure out why and stop it.
For example, I have following folders in my repo
app/
website/
docs/
etc.
I want to run tidypy in only app directory as a precommit hook. Please tell me how to achieve this.
Add some normalization between the different spellings of "license" in the codes pyroma can produce.
Update to support pyflakes v1.6 after flake8 releases their v3.5 on 10/23.
The eradicate tool is only supported in python 2, based on this method in tools/eradicate.py
:
def can_be_used(cls):
return not six.PY3
The eradicate tool has supported python3 for a while now, and after some (probably not python2-friendly) hacks to this file I was able to get tidypy to run it.
Please upgrade tidypy to support eradicate in python3.
Hi,
I think the Pylint error Missing module docstring (pylint:missing-docstring)
has to be merge with Missing docstring in public package (pydocstyle:D100)
to Missing docstring in public module (pydocstyle:D104)
.
Maybe pydocstyle erros have to be kept because they a little bit more accurate.
There's some bugs in 0.6.0, wait for a patch release.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.