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
740
Sphinx/docutilsの光と闇
cocoatomo
November 28, 2018
Tweet
Share
More Decks by cocoatomo
See All by cocoatomo
みんなの知らない翻訳の世界
cocoatomo
0
660
PyPy における静的解析
cocoatomo
0
130
型とは何か
cocoatomo
0
94
Sphinx が支える翻訳ドキュメント
cocoatomo
0
2.1k
Other Decks in Programming
See All in Programming
PostmanでAPIの動作確認が楽になった話
h455h1
0
110
ADRを一年運用してみた/adr_after_a_year
hanhan1978
7
2.2k
StreamlitとTerraformでデータカタログを作った話
gussan0223
0
290
Ruby Function Composition
bkuhlmann
1
320
educure_カリキュラム生操作マニュアル.pdf
linew_official
0
430
今、知っておきたい! 生成AIエージェントの世界
elith
3
340
Rails と人魚の話/rails-and-mermaid
sanfrecce_osaka
0
100
TYPO3 v13 – The road to LTS: What's new and new APIs
luisasofie_xoxo
0
180
Ruby GitHub Packages
bkuhlmann
0
620
try! Swift Tokyo 初参加報告LT
hinakko2
0
190
1BRC--Nerd Sniping the Java Community
gunnarmorling
0
300
単体テストを書かない技術 #phpcon_odawara
o0h
PRO
25
7.7k
Featured
See All Featured
Scaling GitHub
holman
457
140k
The World Runs on Bad Software
bkeepers
PRO
61
6.7k
Rails Girls Zürich Keynote
gr2m
91
13k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
1
3.4k
YesSQL, Process and Tooling at Scale
rocio
162
13k
The Cult of Friendly URLs
andyhume
73
5.7k
A Modern Web Designer's Workflow
chriscoyier
689
190k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
34
8.8k
What's in a price? How to price your products and services
michaelherold
237
11k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
124
32k
Art, The Web, and Tiny UX
lynnandtonic
288
19k
How to Ace a Technical Interview
jacobian
272
22k
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ʹҋ͋ Δ