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
Sphinx/docutilsの光と闇
Search
cocoatomo
November 28, 2018
Programming
1
790
Sphinx/docutilsの光と闇
cocoatomo
November 28, 2018
Tweet
Share
More Decks by cocoatomo
See All by cocoatomo
みんなの知らない翻訳の世界
cocoatomo
0
720
PyPy における静的解析
cocoatomo
0
140
型とは何か
cocoatomo
0
100
Sphinx が支える翻訳ドキュメント
cocoatomo
0
2.3k
Other Decks in Programming
See All in Programming
20241004 モノタロウ式~ドメインモデリングとリアーキテクチャ
monotaro
PRO
1
280
フロントエンドの現在地とこれから
koba04
10
4.6k
Scan with Decoupled Look-back and Onesweep Radix Sort
shocker_0x15
0
110
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
1.2k
sqlcを利用してsqlに型付けを
kamiyam
0
240
NEWTにおけるiOS18対応の進め方
ryu1sazae
0
240
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
690
メルカリ ハロ アプリの技術スタック
atsumo
2
830
WEBアプリケーションにおけるAWS Lambdaを用いた大規模な非同期処理の実践
delhi09
PRO
7
4.3k
複数プロダクトの技術改善・クラウド移行に向き合うチームのフレキシブルなペア・モブプログラミングの実践 / Flexible Pair Programming And Mob Programming
honyanya
0
230
Pythonによるイベントソーシングへの挑戦と現状に対する考察 / Challenging Event Sourcing with Python and Reflections on the Current State
nrslib
3
1.3k
モジュラモノリス、その前に / Modular monolith, before that
euglena1215
8
720
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
355
29k
Embracing the Ebb and Flow
colly
84
4.4k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
46
4.9k
Bootstrapping a Software Product
garrettdimon
PRO
304
110k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
664
120k
Become a Pro
speakerdeck
PRO
24
4.9k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
23k
The World Runs on Bad Software
bkeepers
PRO
65
11k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Automating Front-end Workflow
addyosmani
1365
200k
Learning to Love Humans: Emotional Interface Design
aarron
272
40k
Transcript
Sphinx/docutils ܕ͚ͷޫͱҋ @cocoatomo
ΞδΣϯμ 1. ܕͱ 2. Pythonͷܕώϯτ 3. ޙ͚ͷܕ͚࡞ۀ 4. ܕ͚ͷҋ 5.
ܕ͚ͷޫ 6. ऴΘΓʹ
1. ܕͱ • ͷछผྨ • ࣮ߦલʹ໌͠ͳ͍ܕʢಈతܕʣ • ॊೈͳϓϩάϥϜ͕ॻ͚Δ • ॊೈա͗ͯͲΜͳ͕དྷΔ͔͔Βͳ͍
• ࣮ߦલʹ໌͢Δܕʢ੩తܕʣ • ࣮ߦલʹ෦తʹόά͕ݕग़Ͱ͖Δ • ܕγεςϜ͕ځ۶ͳ͜ͱʢ͏ੲͷʣ
2. Pythonͷܕώϯτ • มɺؔʢύϥϝʔλ&ฦΓʣʹର͢Δܕࢦఆ • ͋͘·ͰΦϓγϣϯ • ੩తͳܕղੳπʔϧ͕ར༻/࣮ߦ࣌ʹແࢹ • PEP
484 -- Type Hints • PEP 561 -- Distributing and Packaging Type Information
3. ޙ͚ͷܕ͚࡞ۀ • มؔͷΘΕํ͔ΒܕΛਪଌ • ೖɺଐੑɺҾɺฦΓ͕ೖ͞ΕΔมͳͲ • ෳͷܕ͕༗ΓಘΔ߹UnionΛ͏ • Ͳ͏ͯ͠ܕ͕͚ΒΕͳ͍ͱ͖ܕΛແࢹ͢Δ
• # type: ignoreͱ͍͏ίϝϯτͰແࢹ • ಈతʹੜ͑Δଐੑɺ৯͍ҧ͏ϝιουΦʔόʔϥΠυ
4. ܕ͚ͷҋ • ܕ͕͔Βͳ͍ • ಛʹϑϨʔϜϫʔΫͷ൚༻తͳ࣮ • ઈରʹטΈ߹Θͳ͍ܕ • docutils.nodes.Elementͷ__add__ͱ__iadd__
• MypyҾͷܕ͕ಉ͡Ͱ͋Δ͜ͱΛٻΊΔ ͕……
__add__ͱ__iadd__
5. ܕ͚ͷޫ • όά͕ݟ͔Δ • quote_plusͷฦΓʢstrʣͷdecodeϝιουΛ ݺ΅͏ͱ͢Δ͕ʢPy3ʹʣͦΜͳͷແ͍!! • https://github.com/sphinx-doc/sphinx/commit/ 3808405b50503f8902ce6c061272c2e7d1b359
cc#diff-d0e894e396b3cee20ed52b6be6ad63e6
decodeΛআ
6. ऴΘΓʹ • ΈΜͳγϯϓϧͳܕ͕͘PythonίʔυΛॻ͜ ͏ͳ!! • ※. docutilsʹޫ͋Δ͠ɺSphinxʹҋ͋ Δ