Run `pyupgrade` on python code blocks in documentation files
Project description
pyupgrade-docs
Run pyupgrade
on python code blocks in documentation files.
install
pip install pyupgrade-docs
usage
pyupgrade-docs
provides a single executable (pyupgrade-docs
) which will modify
.rst
/ .md
files in place.
It currently supports the following pyupgrade
options:
--keep-percent-format
--py3-plus
--py3-only
--py36-plus
Following additional parameters can be used:
-E
/--skip-errors
pyupgrade-docs
will format code in the following block types:
(markdown)
```python
def hello():
print("hello world")
```
(rst)
.. code-block:: python
def hello():
print("hello world")
usage with pre-commit
See pre-commit for instructions
Sample .pre-commit-config.yaml
:
- repo: https://github.com/verhovsky/pyupgrade-docs
rev: v0.1.0
hooks:
- id: pyupgrade-docs
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyupgrade_docs-0.1.0.tar.gz
(3.9 kB
view hashes)