summaryrefslogtreecommitdiff
path: root/sphinx/builders/latex/util.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2020-04-19 16:50:40 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2020-04-19 16:56:40 +0900
commita24ef1f0cc4ebc29871289b5b92d76f4fe7b7e80 (patch)
tree4d8ba32769224823724f547289561d8be4ccf922 /sphinx/builders/latex/util.py
parent5c14375365fe9a9f7b97cc37988d17a8a3ec56d2 (diff)
downloadsphinx-git-a24ef1f0cc4ebc29871289b5b92d76f4fe7b7e80.tar.gz
refactor: Add Optional to type annotations
Diffstat (limited to 'sphinx/builders/latex/util.py')
-rw-r--r--sphinx/builders/latex/util.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/sphinx/builders/latex/util.py b/sphinx/builders/latex/util.py
index b7d79121c..0e3eb739d 100644
--- a/sphinx/builders/latex/util.py
+++ b/sphinx/builders/latex/util.py
@@ -8,6 +8,8 @@
:license: BSD, see LICENSE for details.
"""
+from typing import Optional
+
from docutils.writers.latex2e import Babel
@@ -40,7 +42,7 @@ class ExtBabel(Babel):
self.supported = False
return 'english' # fallback to english
- def get_mainlanguage_options(self) -> str:
+ def get_mainlanguage_options(self) -> Optional[str]:
"""Return options for polyglossia's ``\\setmainlanguage``."""
if self.use_polyglossia is False:
return None