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
770
Sphinx/docutilsの光と闇
cocoatomo
November 28, 2018
Tweet
Share
More Decks by cocoatomo
See All by cocoatomo
みんなの知らない翻訳の世界
cocoatomo
0
700
PyPy における静的解析
cocoatomo
0
130
型とは何か
cocoatomo
0
98
Sphinx が支える翻訳ドキュメント
cocoatomo
0
2.2k
Other Decks in Programming
See All in Programming
Jetpack for KMP
fornewid
1
290
CSC307 Lecture 08
javiergs
PRO
0
330
AWS初心者ってどうやってAWSを学ぶ?〜アプリエンジニアがやってよかったアーキテクチャ学習方法〜
yamanashi_ren01
0
190
大規模マルチテナントを解決するYugabyteDBという選択肢
nnaka2992
1
250
CSC307 Lecture 09
javiergs
PRO
1
500
CSC307 Lecture 11
javiergs
PRO
0
240
Temporalを取り巻く仕様を整理する
sajikix
0
110
CSC307 Lecture 13
javiergs
PRO
0
150
From Spring Boot 2 to Spring Boot 3 with Java 22 and Jakarta EE
ivargrimstad
0
1.9k
実用的かつリーズナブルな 「Azure × Gemini × LINE」~キャラクターBot 実装ライブデモ~
tomodo_ysys
1
170
Mastering Developer Experience: A Roadmap for Success 【開発生産性Conference 2024】
findyinc
1
380
Terraformテスト入門
msato
0
520
Featured
See All Featured
What's in a price? How to price your products and services
michaelherold
239
11k
GraphQLの誤解/rethinking-graphql
sonatard
59
9.6k
Making the Leap to Tech Lead
cromwellryan
127
8.7k
Large-scale JavaScript Application Architecture
addyosmani
506
110k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
277
13k
Designing the Hi-DPI Web
ddemaree
276
34k
In The Pink: A Labor of Love
frogandcode
139
22k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
36
9.1k
Building an army of robots
kneath
301
42k
The Invisible Customer
myddelton
117
13k
Intergalactic Javascript Robots from Outer Space
tanoku
266
26k
Navigating Team Friction
lara
181
13k
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ʹҋ͋ Δ