Skip to main content

Format python files automatically (sorted imports + yapf)

Project description

fmtpy

Uses yapf to format python files, but with properly sorted import statemnts.

Requirements

Installation

pip install fmtpy

Usage

usage: fmtpy [-h] [-s {pep8,google,yapf,facebook}] [-i] [-o] [-n]
           files [files ...]

positional arguments:
  files                 files to format

optional arguments:
  -h, --help            show this help message and exit
  -s {pep8,google,yapf,facebook}, --style {pep8,google,yapf,facebook}
                        Formatting style
  -i, --in-place        Make changes in-place
  -o, --only-imports    Only return sorted import statements
  -n, --show-line-numbers
                        Render a column for line numbers

Exampls

asciicast

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

fmtpy-0.0.1.tar.gz (5.1 kB view hashes)

Uploaded Source

Built Distribution

fmtpy-0.0.1-py2.py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 2 Python 3

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