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.
Metadata
Release files for pydiatra 0.11.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pydiatra-0.11.1.tar.gz | 42.9 kB | Details |
Release files / pydiatra-0.11.1.tar.gz
| Download URL | pydiatra-0.11.1.tar.gz |
|---|---|
| Size | 42.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
faa3956559a913bdbd3f43a25c0e8e5bc3ce1a4163434bc745c0ec348356a309
|
|
BLAKE2b-256 checksum How to use checksums |
f79eea2000a48c4b8b8007722667d5fbcb41eb67a9dc99d07408bee6393b733f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |