PYTHON3(1)

πŸ’… PYTHON3(1) β€” the manual, but make it make sense

okay bestie, sit down, hydrate, because today we're reading the manual page for python3 (that's the manual name right there in the corner, and yes we're keeping it, she's iconic) and honestly? it's giving tooling. it's giving your linter has opinions. let's get into it πŸ’–


✨ NAME ✨

python3 autopep8.py β€” autopep8

like. that's the whole name. no notes. πŸŽ€


🌸 DESCRIPTION 🌸

so here's the vibe: this is what you type at her, fr fr β€”

usage: autopep8 [-h] [--version] [-v] [-d] [-i] [--global-config
filename]

       [--ignore-local-config] [-r] [-j n] [-p n] [-a] [--experimental]
       [--exclude globs] [--list-fixes] [--ignore errors] [--select
       errors] [--max-line-length n] [--line-range line line]
       [--hang-closing] [--exit-code] [files ...]

Automatically formats Python code to conform to the PEP 8 style guide.

that's it. that's the mission statement. she takes your chaos and she makes it PEP 8 shaped. slay. ✨


πŸ¦‹ positional arguments:

  • files β€” the files you want formatted, OR '-' if you're feeding her from standard in. yes, a single lil dash. she knows what it means. 🫢

πŸ‘‘ OPTIONS πŸ‘‘

one bullet per flag, no skipping, no summarizing, we are thorough in this household:

  • -h, --help β€” show this help message and then dip. bye! πŸ‘‹
  • --version β€” show the program's version number and exit. classic.
  • -v, --verbose β€” print verbose messages. and here's the cute part: multiple -v result in more verbose messages, so you can just keep stacking them like accessories. πŸ’…
  • -d, --diff β€” print the diff for the fixed source. show me the receipts, bestie.
  • -i, --in-place β€” make changes to files in place. she's editing the actual file, no take-backs. 😭
  • --global-config filename β€” path to a global pep8 config file. and listen: if this file does not exist then this is ignored (default: ~/.config). she's not gonna fight you about it.
  • --ignore-local-config β€” don't look for and apply local config files. if you don't pass this, defaults get updated with any config files found in the project's root directory. so like, passing it = "do NOT read the room." πŸ™ˆ
  • -r, --recursive β€” run recursively over directories. ⚠️ heads up: must be used with --in-place or --diff, no exceptions, she said what she said.
  • -j, --jobs n β€” number of parallel jobs. if the value is less than 1, she matches your CPU count. multitasking queen. πŸ”₯
  • -p, --pep8-passes n β€” maximum number of additional pep8 passes (default: infinite). yes. infinite. she will keep going. she's committed.
  • -a, --aggressive β€” enable non-whitespace changes. and like -v, it stacks: multiple -a result in more aggressive changes. more -a = more unhinged = more fixed. πŸ’€
  • --experimental β€” enable experimental fixes. it's giving beta, it's giving we're trying something, be aware.
  • --exclude globs β€” exclude file/directory names that match these comma-separated globs. not you. not today. 🚫
  • --list-fixes β€” list codes for fixes. this is the cheat sheet used by --ignore and --select.
  • --ignore errors β€” do not fix these errors/warnings (default: E226,E24,W50,W690). copy those exactly, bestie, they're real.
  • --select errors β€” fix ONLY these errors/warnings (e.g. E4,W). tunnel vision, but make it fashion.
  • --max-line-length n β€” set maximum allowed line length (default: 79). yes, 79. that's the number. do not fight her on the number. 🌸
  • --line-range, --range line line β€” only fix errors found within this inclusive range of line numbers (e.g. 1 99). and important: line numbers are indexed at 1. not 0. one. 🧚
  • --hang-closing β€” hang-closing option passed to pycodestyle. that's literally it, it's a passthrough, she's just the messenger.
  • --exit-code β€” change to behavior of exit code. here's the whole deal, slowly: default behavior of return value: 0 is no differences, 1 is error exit. but when you add this option, return 2. and 2 is exists differences. so like. 0 = we're chill, 1 = something went wrong, 2 = there ARE differences and she wants you to know. πŸ‘‘

🌈 SEE ALSO 🌈

the full documentation for python3 is maintained as a Texinfo manual. if the info and python3 programs are properly installed at your site, this command:

info python3

should give you access to the complete manual. so go read the whole thing, she has lore. πŸ“š


and that's the page, bestie. version python3 autopep8.py 2.3.2, dated January 2025 β€” a true icon of the era, and we love her for it. periodt. πŸ’–βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from