docformatter

Formats docstrings to follow PEP 257
Download

docformatter Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • myint
  • Publisher web site:
  • https://github.com/myint/

docformatter Tags


docformatter Description

docformatter is a Python module that formats docstrings to follow PEP 257.ExampleAfter running:$ docformatter example.pythis:def launch_rocket(): """Launchtherocket."""def factorial(x): ''' Return x factorial. This uses math.factorial. ''' import math math.factorial(x)def print_factorial(x): """Print x factorial""" print(factorial(x))def main(): """Main function""" print_factorial(5) if factorial(10): launch_rocket()gets formatted into this:def launch_rocket(): """Launch the rocket."""def factorial(x): """Return x factorial. This uses math.factorial. """ import math math.factorial(x)def print_factorial(x): """Print x factorial.""" print(factorial(x))def main(): """Main function.""" print_factorial(5) if factorial(10): launch_rocket()OptionsBelow is the help output:usage: docformatter files Formats docstrings to follow PEP 257.positional arguments: files files to formatoptional arguments: -h, --help show this help message and exit --in-place make changes to file instead of printing diff --no-backup do not write backup files --version show program's version number and exitProduct's homepage


docformatter Related Software