PEP8(1)

πŸ“¦ version 1.7.1, in ubuntu jammy

πŸ’– PEP8(1) β€” the pep8 girlie's manual πŸ’–

okay so bestie, welcome to the pep8 manual page, section 1, User Commands. this is your girl's whole personality: a tool to check your Python code against some of the style conventions in PEP 8. yes, those conventions. the ones your linter has opinions about. she's iconic, she's picky, she's here to help πŸ’…


✨ NAME ✨

pep8 β€” A tool to check your Python code against some of the style conventions in PEP 8.

fr fr that's the whole gig. she reads your Python, she compares it to the vibe rules in PEP 8, she tells you what's giving messy 🌸


πŸ¦‹ SYNOPSIS πŸ¦‹

pep8 [options] input ...

that's it. options first if you want them, then the input β€” files, directories, whatever you're pointing her at 🫢


πŸ‘‘ OPTIONS πŸ‘‘

  • --version β€” show program's version number and exit. short and sweet, she tells you who she is and dips ✨
  • -h, --help β€” show this help message and exit. your bestie explaining herself, in terminal form πŸ’–
  • -v, --verbose β€” print status messages, or debug with -vv. one -v for the tea, two -vs for the whole tea 😭
  • -q, --quiet β€” report only file names, or nothing with -qq. she's keeping it lowkey. -qq is her not speaking at all, which honestly? mood πŸ’€
  • *--exclude=patterns* β€” exclude files or directories which match these comma separated patterns (default: .svn,CVS,.bzr,.hg,.git,__pycache__). she does NOT want to look in your .git folder, bestie, that's not the vibe πŸ™ˆ
  • *--filename=patterns* β€” when parsing directories, only check filenames matching these comma separated patterns (default: *.py). only the .py girlies get checked when she's walking a directory 🌈
  • *--select=errors* β€” select errors and warning (e.g. E,W6). pick and choose which problems you want to hear about ✨
  • *--ignore=errors* β€” skip errors and warnings (e.g. E4,W). the block button, basically 🚫
  • --first β€” show first occurrence of each error. one and done, no repeats, she said it once πŸ‘‘
  • -r, --repeat β€” (obsolete) show all occurrences of the same error. yeah she's obsolete bestie, she's a legacy icon but she's legacy πŸ’€
  • --show-source β€” show source code for each error. she shows you the exact line, receipts and all 🧾
  • --show-pep8 β€” show text of PEP 8 for each error (implies --first). not only does she clock it, she cites the source. academic baddie πŸ“š
  • --statistics β€” count errors and warnings. the numbers, the data, the chart of your crimes πŸ“Š
  • --count β€” print total number of errors and warnings to standard error and set exit code to 1 if total is not null. total count, and if it ain't zero, exit code says 1 πŸ”₯
  • *--max-line-length=n* β€” set maximum allowed line length (default: 79). seventy-nine. she has standards and the standards are seventy-nine πŸŽ€
  • --hang-closing β€” hang closing bracket instead of matching indentation of opening bracket's line. the hanging indent aesthetic, she supports it πŸ¦‹
  • *--format=format* β€” set the error format [default|pylint|<custom>]. you pick the outfit the errors come dressed in πŸ’…
  • --diff β€” report only lines changed according to the unified diff received on STDIN. feed her a diff through stdin and she'll only clock what actually changed πŸ‘€
  • --benchmark β€” measure processing speed. how fast is she running? she's tracking it ⚑
  • *--config=path* β€” user config file location (default: $HOME/.config/pep8). her settings live at $HOME/.config/pep8 unless you say otherwise 🏠

🌸 USAGE EXAMPLES 🌸

Display how often each error was found:

% pep8 --statistics -qq example/lib/

Show source code and more verbose explanation from PEP 8:

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

look at her go. receipts AND citations. main character energy, no cap πŸ’–


πŸ’œ AUTHOR πŸ’œ

This manual page was written by David Watson <dwatson@debian.org> and Michael Prokop <mika@debian.org>.


okay so that's the whole page bestie, you're fully caught up ✨ this manual page is from pep8 version 1.5.7, dated July 2014 β€” a vintage queen who still ate, and we love her for it. go forth and fix your line lengths, she's watching πŸ‘‘πŸ’–

πŸ“¦ where this page comes from