Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jwilk/pydiatra
yet another static checker for Python code
https://github.com/jwilk/pydiatra
python qa
Last synced: about 1 month ago
JSON representation
yet another static checker for Python code
- Host: GitHub
- URL: https://github.com/jwilk/pydiatra
- Owner: jwilk
- License: mit
- Created: 2016-05-15T18:14:56.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-18T21:27:16.000Z (8 months ago)
- Last Synced: 2024-08-09T00:22:14.274Z (5 months ago)
- Topics: python, qa
- Language: Python
- Homepage: https://jwilk.net/software/pydiatra
- Size: 436 KB
- Stars: 21
- Watchers: 3
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.rst
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
Overview
========**pydiatra** is yet another static checker for Python code.
Implemented checks
==================* embedded code copies
* ``except`` shadowing builtins
(e.g. ``except IOError, OSError:``, which overwrites ``OSError``)* bare ``except``
(i.e. ``except:``)* hardcoded errno values
(e.g. ``exc.errno == 2`` instead of ``exc.errno == errno.ENOENT``)* inconsistent use of tabs and spaces in indentation
* ``mkstemp()`` file descriptor leaks
(e.g. ``path = tempfile.mkstemp()[1]``)* obsolete PIL imports
(e.g. ``import Image`` instead of ``from PIL import Image``)* regular expression syntax errors
* misplaced flags arguments in
``re.split()``, ``re.sub()``, ``re.subn()``* dubious or deprecated constructs in regular expressions:
* duplicate range
(e.g. ``re.compile("[aa]")``)* overlapping ranges
(e.g. ``re.compile("[a-zA-z]")``)* bad escape sequences
(e.g. ``re.compile(r"\eggs")``)* misplaced inline flags
(e.g. ``re.compile("eggs(?i)")``; Python 3.6+ only)* combining incompatible flags
* redundant flags
* string exceptions
(e.g. ``raise "eggs"`` or ``except "ham":``)* string formatting errors
* comparisons with ``sys.version`` or ``sys.hexversion``
* Python syntax errors
* Python syntax warnings
* assertions that are always true
* syntactic constructs that are no longer supported in Python 3
* ill-formed assignments to global variables
* use of ``async`` and ``await`` as names
* invalid escape sequences in strings
(Python 3.6+ only)See the manual page for details.
Prerequisites
=============* Python 2.7 or 3.2+
* futures_ (needed only for Python 2.X).. _futures:
https://pypi.org/project/futures/.. vim:ft=rst ts=3 sts=3 sw=3 et tw=72