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
800
Sphinx/docutilsの光と闇
cocoatomo
November 28, 2018
Tweet
Share
More Decks by cocoatomo
See All by cocoatomo
みんなの知らない翻訳の世界
cocoatomo
0
740
PyPy における静的解析
cocoatomo
0
140
型とは何か
cocoatomo
0
110
Sphinx が支える翻訳ドキュメント
cocoatomo
0
2.4k
Other Decks in Programming
See All in Programming
テスト自動化失敗から再挑戦しチームにオーナーシップを委譲した話/STAC2024 macho
ma_cho29
1
1.2k
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
1
410
社内活動の取り組み紹介 ~ スリーシェイクでこんな取り組みしてます ~
bells17
0
400
eBPF Deep Dive: Architecture and Safety Mechanisms
takehaya
12
1.4k
[FlutterKaigi2024] Effective Form 〜Flutterによる複雑なフォーム開発の実践〜
chocoyama
1
4k
暇に任せてProxmoxコンソール 作ってみました
karugamo
1
680
Fibonacci Function Gallery - Part 1
philipschwarz
PRO
0
150
103 Early Hints
sugi_0000
1
180
命名をリントする
chiroruxx
1
350
開発者とQAの越境で自動テストが増える開発プロセスを実現する
92thunder
1
160
Thoughts and experiences on Rust and TypeScript
unvalley
2
220
Discord Bot with AI -for English learners-
xin9le
1
120
Featured
See All Featured
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Building Applications with DynamoDB
mza
91
6.1k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
28
900
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
0
88
Done Done
chrislema
181
16k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Scaling GitHub
holman
458
140k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
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ʹҋ͋ Δ