mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Migrate to py3 style type annotation: sphinx.environment.adapters.asset
This commit is contained in:
@@ -8,18 +8,14 @@
|
||||
:license: BSD, see LICENSE for details.
|
||||
"""
|
||||
|
||||
if False:
|
||||
# For type annotation
|
||||
from sphinx.environment import BuildEnvironment # NOQA
|
||||
from sphinx.environment import BuildEnvironment
|
||||
|
||||
|
||||
class ImageAdapter:
|
||||
def __init__(self, env):
|
||||
# type: (BuildEnvironment) -> None
|
||||
def __init__(self, env: BuildEnvironment) -> None:
|
||||
self.env = env
|
||||
|
||||
def get_original_image_uri(self, name):
|
||||
# type: (str) -> str
|
||||
def get_original_image_uri(self, name: str) -> str:
|
||||
"""Get the original image URI."""
|
||||
while name in self.env.original_image_uri:
|
||||
name = self.env.original_image_uri[name]
|
||||
|
||||
Reference in New Issue
Block a user