Skip to main content

yet another static checker for Python code

Project description


pydiatra is yet another static checker for Python code.

This is (almost) the same checker that used to be a part of lintian4python.

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
  • regular expression syntax warnings:
    • duplicate range (e.g. re.compile("[aa]"))
    • overlapping ranges (e.g. re.compile("[a-zA-z]"))
  • string exceptions (e.g. raise "eggs" or except "ham":)
  • string formatting errors
  • Python syntax errors
  • Python syntax warnings
    • assertions that are always true
    • syntactic constructs that are no longer supported in Python 3

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pydiatra, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size pydiatra-0.1.tar.gz (18.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page