refactor SphinxSmartQuotes: Override smartquotes_action by str value (instaed of property)

This commit is contained in:
Takeshi KOMIYA 2018-12-12 21:48:06 +09:00
parent bf491cff2f
commit 10b1a2fba2

View File

@ -353,6 +353,9 @@ class SphinxSmartQuotes(SmartQuotes, SphinxTransform):
if not self.is_available():
return
# override default settings with :confval:`smartquotes_action`
self.smartquotes_action = self.config.smartquotes_action
super(SphinxSmartQuotes, self).apply()
def is_available(self):
@ -381,15 +384,6 @@ class SphinxSmartQuotes(SmartQuotes, SphinxTransform):
else:
return False
@property
def smartquotes_action(self):
# type: () -> str
"""A smartquotes_action setting for SmartQuotes.
Users can change this setting through :confval:`smartquotes_action`.
"""
return self.config.smartquotes_action
def get_tokens(self, txtnodes):
# type: (List[nodes.Text]) -> Generator[Tuple[unicode, unicode], None, None]
# A generator that yields ``(texttype, nodetext)`` tuples for a list