Go to main content

man pages section 1: User Commands

Exit Print View

Updated: Wednesday, July 27, 2022
 
 

pycodestyle (1)

Name

pycodestyle - A tool to check your Python code against some of the style conventions in PEP 8.

Synopsis

pycodestyle [options] input ...

Description

PYCODESTYLE(1)                   User Commands                  PYCODESTYLE(1)



NAME
       pycodestyle  -  A  tool  to  check your Python code against some of the
       style conventions in PEP 8.

SYNOPSIS
       pycodestyle [options] input ...

OPTIONS
       --version
              show program's version number and exit

       -h, --help
              show this help message and exit

       -v, --verbose
              print status messages, or debug with -vv

       -q, --quiet
              report only file names, or nothing with -qq

       --exclude=patterns
              exclude files or directories which match these  comma  separated
              patterns (default: .svn,CVS,.bzr,.hg,.git,__pycache__,.tox)

       --filename=patterns
              when  parsing  directories,  only check filenames matching these
              comma separated patterns (default: *.py)

       --select=errors
              select errors and warning (e.g. E,W6)

       --ignore=errors
              skip    errors    and    warnings    (e.g.    E4,W)    (default:
              E121,E123,E126,E226,E24,E704,W503)

       --first
              show first occurrence of each error

       -r, --repeat
              (obsolete) show all occurrences of the same error

       --show-source
              show source code for each error

       --show-pep8
              show text of PEP 8 for each error (implies --first)

       --statistics
              count errors and warnings

       --count
              print  total number of errors and warnings to standard error and
              set exit code to 1 if total is not null

       --max-line-length=n
              set maximum allowed line length (default: 79)

       --hang-closing
              hang closing bracket instead of matching indentation of  opening
              bracket's line

       --format=format
              set the error format [default|pylint|<custom>]

       --diff report only lines changed according to the unified diff received
              on STDIN

       --benchmark
              measure processing speed

       --config=path
              user config file location (default: $HOME/.config/pycodestyle)


       USAGE EXAMPLES

       Display how often each error was found:

              % pycodestyle --statistics -qq example/lib/

       Show source code and more verbose explanation from PEP 8:

              % pycodestyle --show-source --show-pep8 foo.py

AUTHOR
       This manual page was  written  by  David  Watson  <dwatson@debian.org>,
       Michael Prokop <mika@debian.org> and Ondrej Novy <onovy@debian.org>.



ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       +---------------+----------------------------+
       |ATTRIBUTE TYPE |      ATTRIBUTE VALUE       |
       +---------------+----------------------------+
       |Availability   | library/python/pycodestyle |
       +---------------+----------------------------+
       |Stability      | Uncommitted                |
       +---------------+----------------------------+

NOTES
       Source  code  for open source software components in Oracle Solaris can
       be found at https://www.oracle.com/downloads/opensource/solaris-source-
       code-downloads.html.

       This     software     was    built    from    source    available    at
       https://github.com/oracle/solaris-userland.   The  original   community
       source was downloaded from  pypi:///pycodestyle==2.7.0.

       Further information about this software can be found on the open source
       community website at https://pycodestyle.readthedocs.io/en/latest/.



pycodestyle 2.7.0                November 2016                  PYCODESTYLE(1)