This package provides a command line API to use the PyDev Code Formatter (the PyDev Code formatter is created by extracting the engine for code formatting provided by PyDev: http://www.pydev.org).
The PyDev Formatter is a conservative python code formatter and will try to keep the structure of the code as close as possible to the original sources, while fixing many common issues such as:
Note that it does not try to break statements to fit any pre-specified line length (as gofmt).
Basic use of the formatter is:
python -m pydevf <filename_or_directory>
python -m pydevf -h
may be used to see the help for additional parameters.
To install the PyDev Formatter use:
pip install pydevf
To use it with pre-commit, just add the following repo to your .pre-commit-config.yaml
:
- repo: https://github.com/fabioz/PyDev.Formatter rev: '' # Use the sha or tag you want to point at hooks: - id: pydevf
Note that in PyDev there are tools to help on those manual cases. i.e.:
Wrap docstrings/comments with Ctrl+2, W
-- See: http://pydev.blogspot.com/2015/04/wrapping-docstringscomments-in-pydev.html.
Wrap/unwrap lists/calls with Ctrl+1
, Wrap expression
/Unwrap expression
(used with cursor inside the list/call).
By default the formatter will create a daemon and will reuse it among multiple invocations (because the formatter is very fast but its startup is slow). If you don't want to use this mode use the --no-daemon
parameter.
setup.py
and version.py
git tag {{version}}
(i.e.: v0.1.2)git push --tags
(travis should build and deploy)setup.py
and version.py
python setup.py sdist bdist_wheel
python -m twine upload dist/*
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4