Skip to main content

A small wrapper around lib2to3 to help write Python 3 compatible code.

Project description

py3kwarn is a small wrapper around lib2to3 to help write Python3 compatible code. It provides flake8-style warning messages.

See the lib2to3 documentation for information on warning messages.

Pull requests are welcome!

Installation

Requires Python 2.7+

$ pip install py3kwarn

…or to install from the git repository:

$ pip install -e git+git://github.com/liamcurry/py3kwarn.git#egg=py3kwarn

Usage from the command line

$ py3kwarn [filename]

Usage with vim

You can use py3kwarn with syntastic. If you want to use py3kwarn with another syntax checker (like flake8), then you will have to add this to your vim config:

let g:syntastic_python_checkers=['flake8', 'py3kwarn']

TODO

  • Friendlier messages.

  • A flake8 extension.

  • Use argparse to add smarter options.

  • Make it work with Python 2.6

  • Flags to ignore certain errors

  • Compatibility mode, where warning messages provide suggestions to write forwards compatible code. Make this the default.

  • Make it faster. Right now it is quite slow compared to other syntax checkers. Major refactoring may be necessary.

  • tox support

Project details


Download files

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

Source Distribution

py3kwarn-0.1.4.tar.gz (8.1 kB view details)

Uploaded Source

File details

Details for the file py3kwarn-0.1.4.tar.gz.

File metadata

  • Download URL: py3kwarn-0.1.4.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for py3kwarn-0.1.4.tar.gz
Algorithm Hash digest
SHA256 df5721cc3685ce5939149de121a2f1bc3fbea73bd3a0524d720614a348a52bf4
MD5 1d76d8f630cad134556388b4bf61dd54
BLAKE2b-256 f4e8e5ffaf3958274fb8a962b9ede98d96d1ef5b5d7f4f0a584801d7f7d5fd53

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page