Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
PyCon APAC 2013 LT
Search
Hideo Hattori
September 15, 2013
Programming
0
80
PyCon APAC 2013 LT
PEP 8 and autopep8
Hideo Hattori
September 15, 2013
Tweet
Share
More Decks by Hideo Hattori
See All by Hideo Hattori
gocloc
hhatto
0
560
RustとPython
hhatto
4
2.6k
PHP Kansai 2013 LT
hhatto
0
98
Other Decks in Programming
See All in Programming
エンジニアの「手元の自動化」を加速するn8n 2026.02.27
symy2co
0
160
AIコードレビューの導入・運用と AI駆動開発における「AI4QA」の取り組みについて
hagevvashi
0
500
AI 開発合宿を通して得た学び
niftycorp
PRO
0
140
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
390
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
560
Claude Codeログ基盤の構築
giginet
PRO
7
3.4k
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
250
GoのDB アクセスにおける 「型安全」と「柔軟性」の両立 - Bob という選択肢
tak848
0
200
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
5
1k
AI Assistants for Your Angular Solutions
manfredsteyer
PRO
0
140
Ruby and LLM Ecosystem 2nd
koic
1
960
encoding/json/v2のUnmarshalはこう変わった:内部実装で見る設計改善
kurakura0916
0
420
Featured
See All Featured
Measuring & Analyzing Core Web Vitals
bluesmoon
9
790
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
88
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
210
The Mindset for Success: Future Career Progression
greggifford
PRO
0
280
Evolving SEO for Evolving Search Engines
ryanjones
0
160
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
560
Scaling GitHub
holman
464
140k
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
89
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
640
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
130
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
84
Skip the Path - Find Your Career Trail
mkilby
1
82
Transcript
PEP 8 and autopep8 PyCon APAC 2013 LT / 2013.09.15
Hideo Hattori
whoami C/Python/Zsh My Python Projects , , , ... code
on , @hhatto pgmagick otamapy genzshcomp meow Github Bitbucket
PEP 8 coding conventions for the Python code Nc”úùk1 Õúß
Õc v ”c v göpvz̈v©–− 2013.08.01 •ò&\©¤ http://www.python.org/dev/peps/pep- 0008/
PEP 8 modernisation 1 m¤ß”5ðcv •9¡−l¡ ׳•9¡−l¡ Python1.5.2 •9¡−l¡w£Œ\©–¤ß Python2/3
•9¡−l¡wûl\©¤ß http://hg.python.org/peps/rev/fb24c80e9afb
About autopep8 simple command-line tool automatic formatting for Python Code
require v0.9.4 (2013.09.08) pep8 $ pip install autopep8
For Example invalid PEP 8 code import sys, os n
= True if n != None: print("none") def f(x): return 2 * x
Output Auto-Formatting Code $ autopep8 invalid.py import sys import os
n = True if n != None: print("none") def f(x): return 2 * x
Aggressive $ autopep8 -a invalid.py import sys import os n
= True if n is not None: print("none") def f(x): return 2 * x
Print Diff $ autopep8 -d invalid.py --- original/invalid.py +++ fixed/invalid.py
@@ -1,7 +1,10 @@ -import sys, os +import sys +import os n = True if n != None: print("none") -def f(x): return 2 * x + +def f(x): + return 2 * x
Other Feature ignore/select errors max-line recursive/jobs
ofiØ#”O •PEP 8 ³
⁄¿autopep8 ³³›–Æ–z“\o
https://github.com/hhatto/autopep8
Thank you