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
77
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
550
RustとPython
hhatto
4
2.5k
PHP Kansai 2013 LT
hhatto
0
94
Other Decks in Programming
See All in Programming
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
350
2年のAppleウォレットパス開発の振り返り
muno92
PRO
0
190
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
[AI Engineering Summit Tokyo 2025] LLMは計画業務のゲームチェンジャーか? 最適化業務における活⽤の可能性と限界
terryu16
2
500
ThorVG Viewer In VS Code
nors
0
750
Implementation Patterns
denyspoltorak
0
260
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
400
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.7k
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
220
メルカリのリーダビリティチームが取り組む、AI時代のスケーラブルな品質文化
cloverrose
2
500
インターン生でもAuth0で認証基盤刷新が出来るのか
taku271
0
180
AI Agent の開発と運用を支える Durable Execution #AgentsInProd
izumin5210
7
2.2k
Featured
See All Featured
The Mindset for Success: Future Career Progression
greggifford
PRO
0
220
BBQ
matthewcrist
89
10k
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
120
Design of three-dimensional binary manipulators for pick-and-place task avoiding obstacles (IECON2024)
konakalab
0
340
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
1
430
The Spectacular Lies of Maps
axbom
PRO
1
450
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
190
Are puppies a ranking factor?
jonoalderson
1
2.6k
AI: The stuff that nobody shows you
jnunemaker
PRO
2
200
HDC tutorial
michielstock
1
330
Building the Perfect Custom Keyboard
takai
2
670
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
210
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