mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #4651 from tk0miya/fix_flake8_violations
Fix flake8 violations
This commit is contained in:
commit
63f6603297
@ -10,9 +10,9 @@
|
|||||||
import os
|
import os
|
||||||
import shutil
|
import shutil
|
||||||
import sys
|
import sys
|
||||||
import warnings
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from sphinx.testing.path import path
|
from sphinx.testing.path import path
|
||||||
|
|
||||||
pytest_plugins = 'sphinx.testing.fixtures'
|
pytest_plugins = 'sphinx.testing.fixtures'
|
||||||
|
@ -11,16 +11,15 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# "raises" imported for usage by autodoc
|
# "raises" imported for usage by autodoc
|
||||||
import six
|
|
||||||
import sys
|
import sys
|
||||||
from sphinx.testing.util import SphinxTestApp, Struct
|
|
||||||
import pytest
|
import pytest
|
||||||
|
import six
|
||||||
from six import StringIO
|
|
||||||
from docutils.statemachine import ViewList
|
from docutils.statemachine import ViewList
|
||||||
|
from six import StringIO
|
||||||
|
|
||||||
from sphinx.ext.autodoc import AutoDirective, add_documenter, \
|
from sphinx.ext.autodoc import add_documenter, FunctionDocumenter, ALL # NOQA
|
||||||
ModuleLevelDocumenter, FunctionDocumenter, cut_lines, between, ALL
|
from sphinx.testing.util import SphinxTestApp, Struct
|
||||||
from sphinx.util import logging
|
from sphinx.util import logging
|
||||||
|
|
||||||
app = None
|
app = None
|
||||||
@ -279,8 +278,8 @@ class Base(object):
|
|||||||
def inheritedmeth(self):
|
def inheritedmeth(self):
|
||||||
"""Inherited function."""
|
"""Inherited function."""
|
||||||
|
|
||||||
if six.PY3 and sys.version_info[:2] >= (3, 5):
|
|
||||||
|
|
||||||
|
if six.PY3 and sys.version_info[:2] >= (3, 5):
|
||||||
async def _other_coro_func():
|
async def _other_coro_func():
|
||||||
return "run"
|
return "run"
|
||||||
|
|
||||||
@ -345,5 +344,4 @@ class Class(Base):
|
|||||||
|
|
||||||
async def do_coroutine(self):
|
async def do_coroutine(self):
|
||||||
"""A documented coroutine function"""
|
"""A documented coroutine function"""
|
||||||
|
attr_coro_result = await _other_coro_func() # NOQA
|
||||||
attr_coro_result = await _other_coro_func()
|
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
from docutils import nodes
|
from docutils import nodes
|
||||||
from docutils.parsers.rst import Directive
|
from docutils.parsers.rst import Directive
|
||||||
from sphinx.util.nodes import split_explicit_title
|
|
||||||
|
|
||||||
|
|
||||||
class my_figure(nodes.figure):
|
class my_figure(nodes.figure):
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from docutils.parsers import Parser
|
from docutils.parsers import Parser
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('.'))
|
sys.path.insert(0, os.path.abspath('.'))
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from docutils.parsers import Parser
|
from docutils.parsers import Parser
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('.'))
|
sys.path.insert(0, os.path.abspath('.'))
|
||||||
|
@ -1,16 +1,17 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
## set this by test
|
# set this by test
|
||||||
# import os
|
# import os
|
||||||
# import sys
|
# import sys
|
||||||
# sys.path.insert(0, os.path.abspath('.'))
|
# sys.path.insert(0, os.path.abspath('.'))
|
||||||
|
|
||||||
|
from docutils.writers.docutils_xml import XMLTranslator
|
||||||
|
|
||||||
from sphinx.writers.html import HTMLTranslator
|
from sphinx.writers.html import HTMLTranslator
|
||||||
from sphinx.writers.latex import LaTeXTranslator
|
from sphinx.writers.latex import LaTeXTranslator
|
||||||
from sphinx.writers.manpage import ManualPageTranslator
|
from sphinx.writers.manpage import ManualPageTranslator
|
||||||
from sphinx.writers.texinfo import TexinfoTranslator
|
from sphinx.writers.texinfo import TexinfoTranslator
|
||||||
from sphinx.writers.text import TextTranslator
|
from sphinx.writers.text import TextTranslator
|
||||||
from sphinx.writers.websupport import WebSupportTranslator
|
from sphinx.writers.websupport import WebSupportTranslator
|
||||||
from docutils.writers.docutils_xml import XMLTranslator
|
|
||||||
|
|
||||||
|
|
||||||
project = 'test'
|
project = 'test'
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
|
|
||||||
from sphinx.writers.html import HTMLTranslator
|
from sphinx.writers.html import HTMLTranslator
|
||||||
|
|
||||||
|
|
||||||
class ExtHTMLTranslator(HTMLTranslator):
|
class ExtHTMLTranslator(HTMLTranslator):
|
||||||
pass
|
pass
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
import mod_resource
|
import mod_resource
|
||||||
|
|
||||||
import mod_something
|
import mod_something
|
||||||
|
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
MESSAGE="There's no __init__.py in this folder, hence we should be left out"
|
MESSAGE = "There's no __init__.py in this folder, hence we should be left out"
|
||||||
|
@ -1 +1 @@
|
|||||||
"Subpackage Something"
|
"Subpackage Something"
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
""" A module with a trailing underscore """
|
""" A module with a trailing underscore """
|
||||||
|
|
||||||
|
|
||||||
class SomeClass_:
|
class SomeClass_:
|
||||||
""" A class with a trailing underscore """
|
""" A class with a trailing underscore """
|
||||||
|
|
||||||
|
|
||||||
def some_function_(some_arg_):
|
def some_function_(some_arg_):
|
||||||
""" A function with a trailing underscore in name and argument """
|
""" A function with a trailing underscore in name and argument """
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import sys, os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('.'))
|
sys.path.insert(0, os.path.abspath('.'))
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
C.C2
|
C.C2
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def withSentence():
|
def withSentence():
|
||||||
'''I have a sentence which
|
'''I have a sentence which
|
||||||
spans multiple lines. Then I have
|
spans multiple lines. Then I have
|
||||||
@ -15,6 +16,7 @@ def withSentence():
|
|||||||
'''
|
'''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def noSentence():
|
def noSentence():
|
||||||
'''this doesn't start with a
|
'''this doesn't start with a
|
||||||
capital. so it's not considered
|
capital. so it's not considered
|
||||||
@ -22,6 +24,7 @@ def noSentence():
|
|||||||
'''
|
'''
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def emptyLine():
|
def emptyLine():
|
||||||
'''This is the real summary
|
'''This is the real summary
|
||||||
|
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
"""
|
"""
|
||||||
module with trailing underscores everywhere
|
module with trailing underscores everywhere
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
class class_(object):
|
class class_(object):
|
||||||
""" Class """
|
""" Class """
|
||||||
def method_(_arg):
|
def method_(_arg):
|
||||||
""" Method """
|
""" Method """
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
def function_(_arg):
|
def function_(_arg):
|
||||||
""" Function """
|
""" Function """
|
||||||
pass
|
pass
|
||||||
|
@ -8,13 +8,19 @@ value5 = 3 # parent type
|
|||||||
value6 = () # other sequence type, also raises
|
value6 = () # other sequence type, also raises
|
||||||
value7 = ['foo'] # explicitly permitted
|
value7 = ['foo'] # explicitly permitted
|
||||||
|
|
||||||
|
|
||||||
class A(object):
|
class A(object):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class B(A):
|
class B(A):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class C(A):
|
class C(A):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
value8 = C() # sibling type
|
value8 = C() # sibling type
|
||||||
|
|
||||||
# both have no default or permissible types
|
# both have no default or permissible types
|
||||||
|
@ -1,3 +1,2 @@
|
|||||||
|
|
||||||
copyright = u'2006-2009, Author'
|
copyright = u'2006-2009, Author'
|
||||||
|
|
||||||
|
@ -3,4 +3,3 @@
|
|||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
numfig = True
|
numfig = True
|
||||||
|
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import sys, os
|
|
||||||
|
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
html_theme = 'base_theme2'
|
html_theme = 'base_theme2'
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
from bug2437.autodoc_dummy_foo import Foo
|
from bug2437.autodoc_dummy_foo import Foo
|
||||||
|
|
||||||
|
|
||||||
class Bar(object):
|
class Bar(object):
|
||||||
"""Dummy class Bar with alias."""
|
"""Dummy class Bar with alias."""
|
||||||
my_name = Foo
|
my_name = Foo
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
from dummy import *
|
from dummy import * # NOQA
|
||||||
|
|
||||||
|
|
||||||
def test():
|
def test():
|
||||||
"""Dummy function using dummy.*"""
|
"""Dummy function using dummy.*"""
|
||||||
dummy_function()
|
dummy_function() # NOQA
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import sys, os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('.'))
|
sys.path.insert(0, os.path.abspath('.'))
|
||||||
|
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import enum
|
import enum
|
||||||
|
|
||||||
from six import StringIO, add_metaclass
|
from six import StringIO, add_metaclass
|
||||||
|
|
||||||
from sphinx.ext.autodoc import add_documenter # NOQA
|
from sphinx.ext.autodoc import add_documenter # NOQA
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from os import *
|
from os import * # NOQA
|
||||||
|
|
||||||
|
|
||||||
class Foo:
|
class Foo:
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import sys, os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('.'))
|
sys.path.insert(0, os.path.abspath('.'))
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from os import path
|
|
||||||
import sys
|
import sys
|
||||||
|
from os import path
|
||||||
|
|
||||||
sys.path.insert(0, path.abspath(path.dirname(__file__)))
|
sys.path.insert(0, path.abspath(path.dirname(__file__)))
|
||||||
|
|
||||||
|
@ -6,6 +6,7 @@ exclude_patterns = ['_build']
|
|||||||
|
|
||||||
confval1 = True
|
confval1 = True
|
||||||
|
|
||||||
|
|
||||||
def setup(app):
|
def setup(app):
|
||||||
app.add_config_value('confval1', False, None)
|
app.add_config_value('confval1', False, None)
|
||||||
app.add_config_value('confval2', False, None)
|
app.add_config_value('confval2', False, None)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('.'))
|
sys.path.insert(0, os.path.abspath('.'))
|
||||||
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
|
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode']
|
||||||
@ -9,7 +9,7 @@ master_doc = 'index'
|
|||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
|
||||||
|
|
||||||
if 'test_linkcode' in tags:
|
if 'test_linkcode' in tags: # NOQA
|
||||||
extensions.remove('sphinx.ext.viewcode')
|
extensions.remove('sphinx.ext.viewcode')
|
||||||
extensions.append('sphinx.ext.linkcode')
|
extensions.append('sphinx.ext.linkcode')
|
||||||
|
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
||||||
from .mod1 import func1, Class1
|
from .mod1 import func1, Class1 # NOQA
|
||||||
from .mod2 import (
|
from .mod2 import func2, Class2 # NOQA
|
||||||
func2,
|
|
||||||
Class2,
|
|
||||||
)
|
|
||||||
|
@ -2,9 +2,11 @@
|
|||||||
mod1
|
mod1
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def decorator(f):
|
def decorator(f):
|
||||||
return f
|
return f
|
||||||
|
|
||||||
|
|
||||||
@decorator
|
@decorator
|
||||||
def func1(a, b):
|
def func1(a, b):
|
||||||
"""
|
"""
|
||||||
@ -19,6 +21,7 @@ class Class1(object):
|
|||||||
this is Class1
|
this is Class1
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
class Class3(object):
|
class Class3(object):
|
||||||
"""
|
"""
|
||||||
this is Class3
|
this is Class3
|
||||||
|
@ -2,9 +2,11 @@
|
|||||||
mod2
|
mod2
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
def decorator(f):
|
def decorator(f):
|
||||||
return f
|
return f
|
||||||
|
|
||||||
|
|
||||||
@decorator
|
@decorator
|
||||||
def func2(a, b):
|
def func2(a, b):
|
||||||
"""
|
"""
|
||||||
|
@ -10,4 +10,3 @@ rst_epilog = '''
|
|||||||
:align: middle
|
:align: middle
|
||||||
:alt: alternative_text
|
:alt: alternative_text
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -9,4 +9,3 @@ rst_epilog = '''
|
|||||||
:height: 15pt
|
:height: 15pt
|
||||||
:alt: alternative_text
|
:alt: alternative_text
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import sys, os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
sys.path.insert(0, os.path.abspath('.'))
|
sys.path.insert(0, os.path.abspath('.'))
|
||||||
|
|
||||||
|
@ -10,21 +10,26 @@
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
class A(object):
|
class A(object):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class B(A):
|
class B(A):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class C(A):
|
class C(A):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class D(B, C):
|
class D(B, C):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class E(B):
|
class E(B):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
class F(C):
|
class F(C):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
@ -5,9 +5,9 @@ html_theme = 'classic'
|
|||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
|
||||||
latex_documents = [
|
latex_documents = [
|
||||||
('index', 'SphinxTests.tex', 'Testing maxlistdepth=10',
|
('index', 'SphinxTests.tex', 'Testing maxlistdepth=10',
|
||||||
'Georg Brandl', 'howto'),
|
'Georg Brandl', 'howto'),
|
||||||
]
|
]
|
||||||
|
|
||||||
latex_elements = {
|
latex_elements = {
|
||||||
'maxlistdepth': '10',
|
'maxlistdepth': '10',
|
||||||
|
@ -1,16 +1,19 @@
|
|||||||
|
|
||||||
import missing_module
|
import missing_module # NOQA
|
||||||
from missing_module import missing_name
|
import missing_package1.missing_module1 # NOQA
|
||||||
import missing_package1.missing_module1
|
from missing_module import missing_name # NOQA
|
||||||
from missing_package2 import missing_module2
|
from missing_package2 import missing_module2 # NOQA
|
||||||
from missing_package3.missing_module3 import missing_name
|
from missing_package3.missing_module3 import missing_name # NOQA
|
||||||
import sphinx.missing_module4
|
|
||||||
from sphinx.missing_module4 import missing_name2
|
import sphinx.missing_module4 # NOQA
|
||||||
|
from sphinx.missing_module4 import missing_name2 # NOQA
|
||||||
|
|
||||||
|
|
||||||
@missing_name
|
@missing_name
|
||||||
def decoratedFunction():
|
def decoratedFunction():
|
||||||
"""decoratedFunction docstring"""
|
"""decoratedFunction docstring"""
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
class TestAutodoc(object):
|
class TestAutodoc(object):
|
||||||
"""TestAutodoc docstring."""
|
"""TestAutodoc docstring."""
|
||||||
@ -19,4 +22,5 @@ class TestAutodoc(object):
|
|||||||
"""TestAutodoc::decoratedMethod docstring"""
|
"""TestAutodoc::decoratedMethod docstring"""
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
|
||||||
sphinx.missing_module4.missing_function(len(missing_name2))
|
sphinx.missing_module4.missing_function(len(missing_name2))
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import enum
|
import enum
|
||||||
|
|
||||||
from six import StringIO, add_metaclass
|
from six import StringIO, add_metaclass
|
||||||
|
|
||||||
from sphinx.ext.autodoc import add_documenter # NOQA
|
from sphinx.ext.autodoc import add_documenter # NOQA
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,13 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
import sys, os
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from docutils import nodes
|
||||||
|
from docutils.parsers.rst import Directive
|
||||||
|
|
||||||
|
from sphinx import addnodes
|
||||||
|
|
||||||
|
|
||||||
sys.path.append(os.path.abspath('.'))
|
sys.path.append(os.path.abspath('.'))
|
||||||
|
|
||||||
@ -76,15 +83,10 @@ autodoc_mock_imports = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
# modify tags from conf.py
|
# modify tags from conf.py
|
||||||
tags.add('confpytag')
|
tags.add('confpytag') # NOQA
|
||||||
|
|
||||||
|
|
||||||
# -- extension API
|
# -- extension API
|
||||||
|
|
||||||
from docutils import nodes
|
|
||||||
from docutils.parsers.rst import Directive
|
|
||||||
from sphinx import addnodes
|
|
||||||
|
|
||||||
|
|
||||||
def userdesc_parse(env, sig, signode):
|
def userdesc_parse(env, sig, signode):
|
||||||
x, y = sig.split(':')
|
x, y = sig.split(':')
|
||||||
signode += addnodes.desc_name(x, x)
|
signode += addnodes.desc_name(x, x)
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
# Test extension module
|
# Test extension module
|
||||||
|
|
||||||
|
|
||||||
def setup(app):
|
def setup(app):
|
||||||
app.add_config_value('value_from_ext', [], False)
|
app.add_config_value('value_from_ext', [], False)
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
from docutils.parsers import Parser
|
|
||||||
from docutils import nodes
|
from docutils import nodes
|
||||||
|
from docutils.parsers import Parser
|
||||||
|
|
||||||
|
|
||||||
class Parser(Parser):
|
class Parser(Parser):
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
|
|
||||||
from sphinx.setup_command import BuildDoc
|
from sphinx.setup_command import BuildDoc
|
||||||
|
|
||||||
cmdclass = {'build_sphinx': BuildDoc}
|
cmdclass = {'build_sphinx': BuildDoc}
|
||||||
|
@ -4,9 +4,9 @@ master_doc = 'index'
|
|||||||
html_theme = 'classic'
|
html_theme = 'classic'
|
||||||
templates_path = ['_templates']
|
templates_path = ['_templates']
|
||||||
|
|
||||||
|
|
||||||
def setup(app):
|
def setup(app):
|
||||||
app.add_stylesheet('persistent.css')
|
app.add_stylesheet('persistent.css')
|
||||||
app.add_stylesheet('default.css', title="Default")
|
app.add_stylesheet('default.css', title="Default")
|
||||||
app.add_stylesheet('alternate1.css', title="Alternate", alternate=True)
|
app.add_stylesheet('alternate1.css', title="Alternate", alternate=True)
|
||||||
app.add_stylesheet('alternate2.css', alternate=True)
|
app.add_stylesheet('alternate2.css', alternate=True)
|
||||||
|
|
||||||
|
@ -9,4 +9,3 @@ exclude_patterns = ['_build']
|
|||||||
|
|
||||||
extensions = ['sphinx.ext.autosummary']
|
extensions = ['sphinx.ext.autosummary']
|
||||||
autosummary_generate = ['autosummary_templating']
|
autosummary_generate = ['autosummary_templating']
|
||||||
|
|
||||||
|
@ -4,4 +4,3 @@ html_theme = 'test-theme'
|
|||||||
html_theme_path = ['.', 'test_theme']
|
html_theme_path = ['.', 'test_theme']
|
||||||
master_doc = 'index'
|
master_doc = 'index'
|
||||||
exclude_patterns = ['_build']
|
exclude_patterns = ['_build']
|
||||||
|
|
||||||
|
@ -4,13 +4,11 @@
|
|||||||
from setuptools import setup, find_packages
|
from setuptools import setup, find_packages
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='test-theme',
|
name='test-theme',
|
||||||
packages=find_packages(),
|
packages=find_packages(),
|
||||||
include_package_data=True,
|
include_package_data=True,
|
||||||
entry_points="""
|
entry_points="""
|
||||||
[sphinx_themes]
|
[sphinx_themes]
|
||||||
path = test_theme:get_path
|
path = test_theme:get_path
|
||||||
""",
|
""",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
|
||||||
def get_path():
|
def get_path():
|
||||||
return os.path.dirname(os.path.abspath(__file__))
|
return os.path.dirname(os.path.abspath(__file__))
|
||||||
|
@ -8,14 +8,13 @@
|
|||||||
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
|
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
|
||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
|
import pytest
|
||||||
from docutils import nodes
|
from docutils import nodes
|
||||||
|
|
||||||
from sphinx.application import ExtensionError
|
from sphinx.application import ExtensionError
|
||||||
from sphinx.domains import Domain
|
from sphinx.domains import Domain
|
||||||
from sphinx.util import logging
|
|
||||||
|
|
||||||
from sphinx.testing.util import strip_escseq
|
from sphinx.testing.util import strip_escseq
|
||||||
import pytest
|
from sphinx.util import logging
|
||||||
|
|
||||||
|
|
||||||
def test_events(app, status, warning):
|
def test_events(app, status, warning):
|
||||||
|
@ -11,15 +11,14 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from six import PY3
|
|
||||||
|
|
||||||
from sphinx.testing.util import SphinxTestApp, Struct # NOQA
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from docutils.statemachine import ViewList
|
from docutils.statemachine import ViewList
|
||||||
|
from six import PY3
|
||||||
|
|
||||||
from sphinx.ext.autodoc import AutoDirective, add_documenter, \
|
from sphinx.ext.autodoc import AutoDirective, add_documenter, \
|
||||||
ModuleLevelDocumenter, FunctionDocumenter, cut_lines, between, ALL
|
ModuleLevelDocumenter, FunctionDocumenter, cut_lines, between, ALL
|
||||||
|
from sphinx.testing.util import SphinxTestApp, Struct # NOQA
|
||||||
from sphinx.util import logging
|
from sphinx.util import logging
|
||||||
|
|
||||||
app = None
|
app = None
|
||||||
|
@ -10,13 +10,14 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import pickle
|
import pickle
|
||||||
from docutils import nodes
|
import sys
|
||||||
|
from textwrap import dedent
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
import pytest
|
import pytest
|
||||||
from textwrap import dedent
|
from docutils import nodes
|
||||||
from sphinx.errors import SphinxError
|
|
||||||
import sys
|
|
||||||
|
|
||||||
|
from sphinx.errors import SphinxError
|
||||||
from sphinx.testing.path import path
|
from sphinx.testing.path import path
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
import plistlib
|
import plistlib
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from sphinx.testing.path import path
|
from sphinx.testing.path import path
|
||||||
|
|
||||||
# Use plistlib.load in 3.4 and above
|
# Use plistlib.load in 3.4 and above
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
"""
|
"""
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
|
import gettext
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import gettext
|
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
@ -11,15 +11,15 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
|
import xml.etree.cElementTree as ElementTree
|
||||||
from itertools import cycle, chain
|
from itertools import cycle, chain
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
from html5lib import getTreeBuilder, HTMLParser
|
||||||
from six import PY3
|
from six import PY3
|
||||||
|
|
||||||
from sphinx.util.inventory import InventoryFile
|
|
||||||
from sphinx.testing.util import remove_unicode_literals, strip_escseq
|
from sphinx.testing.util import remove_unicode_literals, strip_escseq
|
||||||
import xml.etree.cElementTree as ElementTree
|
from sphinx.util.inventory import InventoryFile
|
||||||
from html5lib import getTreeBuilder, HTMLParser
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
|
|
||||||
TREE_BUILDER = getTreeBuilder('etree', implementation=ElementTree)
|
TREE_BUILDER = getTreeBuilder('etree', implementation=ElementTree)
|
||||||
@ -1251,7 +1251,8 @@ def test_html_sidebar(app, status, warning):
|
|||||||
'index.html': [(".//em/a[@href='https://example.com/man.1']", "", True),
|
'index.html': [(".//em/a[@href='https://example.com/man.1']", "", True),
|
||||||
(".//em/a[@href='https://example.com/ls.1']", "", True),
|
(".//em/a[@href='https://example.com/ls.1']", "", True),
|
||||||
(".//em/a[@href='https://example.com/sphinx.']", "", True)]
|
(".//em/a[@href='https://example.com/sphinx.']", "", True)]
|
||||||
}))
|
|
||||||
|
}))
|
||||||
@pytest.mark.sphinx('html', testroot='manpage_url', confoverrides={
|
@pytest.mark.sphinx('html', testroot='manpage_url', confoverrides={
|
||||||
'manpages_url': 'https://example.com/{page}.{section}'})
|
'manpages_url': 'https://example.com/{page}.{section}'})
|
||||||
@pytest.mark.test_params(shared_result='test_build_html_manpage_url')
|
@pytest.mark.test_params(shared_result='test_build_html_manpage_url')
|
||||||
|
@ -18,11 +18,10 @@ import xml.etree.cElementTree as ElementTree
|
|||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from html5lib import getTreeBuilder, HTMLParser
|
from html5lib import getTreeBuilder, HTMLParser
|
||||||
|
from test_build_html import flat_dict, tail_check, check_xpath
|
||||||
|
|
||||||
from sphinx.util.docutils import is_html5_writer_available
|
from sphinx.util.docutils import is_html5_writer_available
|
||||||
|
|
||||||
from test_build_html import flat_dict, tail_check, check_xpath
|
|
||||||
|
|
||||||
TREE_BUILDER = getTreeBuilder('etree', implementation=ElementTree)
|
TREE_BUILDER = getTreeBuilder('etree', implementation=ElementTree)
|
||||||
HTML_PARSER = HTMLParser(TREE_BUILDER, namespaceHTMLElements=False)
|
HTML_PARSER = HTMLParser(TREE_BUILDER, namespaceHTMLElements=False)
|
||||||
|
|
||||||
|
@ -13,19 +13,18 @@ from __future__ import print_function
|
|||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
from itertools import product
|
from itertools import product
|
||||||
from subprocess import Popen, PIPE
|
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
|
from subprocess import Popen, PIPE
|
||||||
|
|
||||||
from six import PY3
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from six import PY3
|
||||||
|
from test_build_html import ENV_WARNINGS
|
||||||
|
|
||||||
from sphinx.errors import SphinxError
|
from sphinx.errors import SphinxError
|
||||||
from sphinx.util.osutil import cd, ensuredir
|
|
||||||
from sphinx.util import docutils
|
|
||||||
from sphinx.writers.latex import LaTeXTranslator
|
|
||||||
|
|
||||||
from sphinx.testing.util import remove_unicode_literals, strip_escseq
|
from sphinx.testing.util import remove_unicode_literals, strip_escseq
|
||||||
from test_build_html import ENV_WARNINGS
|
from sphinx.util import docutils
|
||||||
|
from sphinx.util.osutil import cd, ensuredir
|
||||||
|
from sphinx.writers.latex import LaTeXTranslator
|
||||||
|
|
||||||
|
|
||||||
LATEX_ENGINES = ['pdflatex', 'lualatex', 'xelatex']
|
LATEX_ENGINES = ['pdflatex', 'lualatex', 'xelatex']
|
||||||
|
@ -14,13 +14,12 @@ import os
|
|||||||
import re
|
import re
|
||||||
from subprocess import Popen, PIPE
|
from subprocess import Popen, PIPE
|
||||||
|
|
||||||
from six import PY3
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from six import PY3
|
||||||
from sphinx.writers.texinfo import TexinfoTranslator
|
from test_build_html import ENV_WARNINGS
|
||||||
|
|
||||||
from sphinx.testing.util import remove_unicode_literals, strip_escseq
|
from sphinx.testing.util import remove_unicode_literals, strip_escseq
|
||||||
from test_build_html import ENV_WARNINGS
|
from sphinx.writers.texinfo import TexinfoTranslator
|
||||||
|
|
||||||
|
|
||||||
TEXINFO_WARNINGS = ENV_WARNINGS + """\
|
TEXINFO_WARNINGS = ENV_WARNINGS + """\
|
||||||
|
@ -8,9 +8,10 @@
|
|||||||
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
|
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
|
||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
import pytest
|
|
||||||
|
|
||||||
|
import pytest
|
||||||
from docutils.utils import column_width
|
from docutils.utils import column_width
|
||||||
|
|
||||||
from sphinx.writers.text import MAXWIDTH
|
from sphinx.writers.text import MAXWIDTH
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
|
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
|
||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
from six import PY3, iteritems
|
|
||||||
import pytest
|
|
||||||
import mock
|
import mock
|
||||||
|
import pytest
|
||||||
|
from six import PY3, iteritems
|
||||||
|
|
||||||
import sphinx
|
import sphinx
|
||||||
from sphinx.config import Config
|
from sphinx.config import Config
|
||||||
|
@ -9,9 +9,10 @@
|
|||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pytest
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
from sphinx.config import Config
|
from sphinx.config import Config
|
||||||
from sphinx.directives.code import LiteralIncludeReader
|
from sphinx.directives.code import LiteralIncludeReader
|
||||||
from sphinx.testing.util import etree_parse
|
from sphinx.testing.util import etree_parse
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from docutils import nodes
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from docutils import nodes
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.sphinx('text', testroot='directive-only')
|
@pytest.mark.sphinx('text', testroot='directive-only')
|
||||||
|
@ -13,6 +13,7 @@ import re
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from sphinx.testing.path import path
|
from sphinx.testing.path import path
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,13 +11,13 @@
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from six import text_type
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from six import text_type
|
||||||
|
|
||||||
|
import sphinx.domains.cpp as cppDomain
|
||||||
from sphinx import addnodes
|
from sphinx import addnodes
|
||||||
from sphinx.domains.cpp import DefinitionParser, DefinitionError, NoOldIdError
|
from sphinx.domains.cpp import DefinitionParser, DefinitionError, NoOldIdError
|
||||||
from sphinx.domains.cpp import Symbol, _max_id, _id_prefix
|
from sphinx.domains.cpp import Symbol, _max_id, _id_prefix
|
||||||
import sphinx.domains.cpp as cppDomain
|
|
||||||
|
|
||||||
|
|
||||||
def parse(name, string):
|
def parse(name, string):
|
||||||
|
@ -10,12 +10,11 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from mock import Mock
|
|
||||||
from docutils import nodes
|
from docutils import nodes
|
||||||
|
from mock import Mock
|
||||||
|
|
||||||
from sphinx import addnodes
|
from sphinx import addnodes
|
||||||
from sphinx.domains.javascript import JavaScriptDomain
|
from sphinx.domains.javascript import JavaScriptDomain
|
||||||
|
|
||||||
from sphinx.testing.util import assert_node
|
from sphinx.testing.util import assert_node
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,13 +10,12 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from docutils import nodes
|
||||||
from mock import Mock
|
from mock import Mock
|
||||||
from six import text_type
|
from six import text_type
|
||||||
from docutils import nodes
|
|
||||||
|
|
||||||
from sphinx import addnodes
|
from sphinx import addnodes
|
||||||
from sphinx.domains.python import py_sig_re, _pseudo_parse_arglist, PythonDomain
|
from sphinx.domains.python import py_sig_re, _pseudo_parse_arglist, PythonDomain
|
||||||
|
|
||||||
from sphinx.testing.util import assert_node
|
from sphinx.testing.util import assert_node
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from docutils import nodes
|
|
||||||
import mock
|
import mock
|
||||||
|
from docutils import nodes
|
||||||
|
|
||||||
from sphinx.domains.std import StandardDomain
|
from sphinx.domains.std import StandardDomain
|
||||||
|
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
"""
|
"""
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from sphinx.testing.util import SphinxTestApp, path
|
|
||||||
from sphinx.builders.html import StandaloneHTMLBuilder
|
from sphinx.builders.html import StandaloneHTMLBuilder
|
||||||
from sphinx.builders.latex import LaTeXBuilder
|
from sphinx.builders.latex import LaTeXBuilder
|
||||||
|
from sphinx.testing.util import SphinxTestApp, path
|
||||||
|
|
||||||
app = env = None
|
app = env = None
|
||||||
|
|
||||||
|
@ -10,11 +10,12 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from sphinx import locale
|
|
||||||
from sphinx.environment.adapters.indexentries import IndexEntries
|
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
|
from sphinx import locale
|
||||||
|
from sphinx.environment.adapters.indexentries import IndexEntries
|
||||||
|
|
||||||
Environment = namedtuple('Environment', 'indexentries')
|
Environment = namedtuple('Environment', 'indexentries')
|
||||||
|
|
||||||
dummy_builder = mock.Mock()
|
dummy_builder = mock.Mock()
|
||||||
|
@ -9,14 +9,14 @@
|
|||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import pytest
|
||||||
from docutils import nodes
|
from docutils import nodes
|
||||||
from docutils.nodes import bullet_list, list_item, caption, comment, reference
|
from docutils.nodes import bullet_list, list_item, caption, comment, reference
|
||||||
|
|
||||||
from sphinx import addnodes
|
from sphinx import addnodes
|
||||||
from sphinx.addnodes import compact_paragraph, only
|
from sphinx.addnodes import compact_paragraph, only
|
||||||
from sphinx.builders.html import StandaloneHTMLBuilder
|
from sphinx.builders.html import StandaloneHTMLBuilder
|
||||||
from sphinx.environment.adapters.toctree import TocTree
|
from sphinx.environment.adapters.toctree import TocTree
|
||||||
import pytest
|
|
||||||
|
|
||||||
from sphinx.testing.util import assert_node
|
from sphinx.testing.util import assert_node
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,7 +16,6 @@ from collections import namedtuple
|
|||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from sphinx.ext.apidoc import main as apidoc_main
|
from sphinx.ext.apidoc import main as apidoc_main
|
||||||
|
|
||||||
from sphinx.testing.util import remove_unicode_literals
|
from sphinx.testing.util import remove_unicode_literals
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import pickle
|
import pickle
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from sphinx import addnodes
|
from sphinx import addnodes
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,10 +9,11 @@
|
|||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
import pytest
|
import pytest
|
||||||
from six import PY2
|
|
||||||
from sphinx.ext.doctest import is_allowed_version
|
|
||||||
from packaging.version import InvalidVersion
|
|
||||||
from packaging.specifiers import InvalidSpecifier
|
from packaging.specifiers import InvalidSpecifier
|
||||||
|
from packaging.version import InvalidVersion
|
||||||
|
from six import PY2
|
||||||
|
|
||||||
|
from sphinx.ext.doctest import is_allowed_version
|
||||||
|
|
||||||
cleanup_called = 0
|
cleanup_called = 0
|
||||||
|
|
||||||
|
@ -9,9 +9,10 @@
|
|||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import pytest
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.sphinx('latex', testroot='ext-imgconverter')
|
@pytest.mark.sphinx('latex', testroot='ext-imgconverter')
|
||||||
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
@pytest.mark.xfail(os.name != 'posix', reason="Not working on windows")
|
||||||
|
@ -10,7 +10,9 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from sphinx.ext.inheritance_diagram import InheritanceDiagram
|
from sphinx.ext.inheritance_diagram import InheritanceDiagram
|
||||||
|
|
||||||
|
|
||||||
@ -48,25 +50,24 @@ def test_inheritance_diagram(app, status, warning):
|
|||||||
for cls in graphs['basic_diagram'].class_info:
|
for cls in graphs['basic_diagram'].class_info:
|
||||||
# use in b/c traversing order is different sometimes
|
# use in b/c traversing order is different sometimes
|
||||||
assert cls in [
|
assert cls in [
|
||||||
('dummy.test.A', 'dummy.test.A', [], None),
|
('dummy.test.A', 'dummy.test.A', [], None),
|
||||||
('dummy.test.F', 'dummy.test.F', ['dummy.test.C'], None),
|
('dummy.test.F', 'dummy.test.F', ['dummy.test.C'], None),
|
||||||
('dummy.test.C', 'dummy.test.C', ['dummy.test.A'], None),
|
('dummy.test.C', 'dummy.test.C', ['dummy.test.A'], None),
|
||||||
('dummy.test.E', 'dummy.test.E', ['dummy.test.B'], None),
|
('dummy.test.E', 'dummy.test.E', ['dummy.test.B'], None),
|
||||||
('dummy.test.D', 'dummy.test.D',
|
('dummy.test.D', 'dummy.test.D', ['dummy.test.B', 'dummy.test.C'], None),
|
||||||
['dummy.test.B', 'dummy.test.C'], None),
|
('dummy.test.B', 'dummy.test.B', ['dummy.test.A'], None)
|
||||||
('dummy.test.B', 'dummy.test.B', ['dummy.test.A'], None)
|
]
|
||||||
]
|
|
||||||
|
|
||||||
# inheritance diagram using :parts: 1 option
|
# inheritance diagram using :parts: 1 option
|
||||||
for cls in graphs['diagram_w_parts'].class_info:
|
for cls in graphs['diagram_w_parts'].class_info:
|
||||||
assert cls in [
|
assert cls in [
|
||||||
('A', 'dummy.test.A', [], None),
|
('A', 'dummy.test.A', [], None),
|
||||||
('F', 'dummy.test.F', ['C'], None),
|
('F', 'dummy.test.F', ['C'], None),
|
||||||
('C', 'dummy.test.C', ['A'], None),
|
('C', 'dummy.test.C', ['A'], None),
|
||||||
('E', 'dummy.test.E', ['B'], None),
|
('E', 'dummy.test.E', ['B'], None),
|
||||||
('D', 'dummy.test.D', ['B', 'C'], None),
|
('D', 'dummy.test.D', ['B', 'C'], None),
|
||||||
('B', 'dummy.test.B', ['A'], None)
|
('B', 'dummy.test.B', ['A'], None)
|
||||||
]
|
]
|
||||||
|
|
||||||
# inheritance diagram with 1 top class
|
# inheritance diagram with 1 top class
|
||||||
# :top-classes: dummy.test.B
|
# :top-classes: dummy.test.B
|
||||||
@ -79,15 +80,13 @@ def test_inheritance_diagram(app, status, warning):
|
|||||||
#
|
#
|
||||||
for cls in graphs['diagram_w_1_top_class'].class_info:
|
for cls in graphs['diagram_w_1_top_class'].class_info:
|
||||||
assert cls in [
|
assert cls in [
|
||||||
('dummy.test.A', 'dummy.test.A', [], None),
|
('dummy.test.A', 'dummy.test.A', [], None),
|
||||||
('dummy.test.F', 'dummy.test.F', ['dummy.test.C'], None),
|
('dummy.test.F', 'dummy.test.F', ['dummy.test.C'], None),
|
||||||
('dummy.test.C', 'dummy.test.C', ['dummy.test.A'], None),
|
('dummy.test.C', 'dummy.test.C', ['dummy.test.A'], None),
|
||||||
('dummy.test.E', 'dummy.test.E', ['dummy.test.B'], None),
|
('dummy.test.E', 'dummy.test.E', ['dummy.test.B'], None),
|
||||||
('dummy.test.D', 'dummy.test.D',
|
('dummy.test.D', 'dummy.test.D', ['dummy.test.B', 'dummy.test.C'], None),
|
||||||
['dummy.test.B', 'dummy.test.C'], None),
|
('dummy.test.B', 'dummy.test.B', [], None)
|
||||||
('dummy.test.B', 'dummy.test.B', [], None)
|
]
|
||||||
]
|
|
||||||
|
|
||||||
|
|
||||||
# inheritance diagram with 2 top classes
|
# inheritance diagram with 2 top classes
|
||||||
# :top-classes: dummy.test.B, dummy.test.C
|
# :top-classes: dummy.test.B, dummy.test.C
|
||||||
@ -100,13 +99,12 @@ def test_inheritance_diagram(app, status, warning):
|
|||||||
#
|
#
|
||||||
for cls in graphs['diagram_w_2_top_classes'].class_info:
|
for cls in graphs['diagram_w_2_top_classes'].class_info:
|
||||||
assert cls in [
|
assert cls in [
|
||||||
('dummy.test.F', 'dummy.test.F', ['dummy.test.C'], None),
|
('dummy.test.F', 'dummy.test.F', ['dummy.test.C'], None),
|
||||||
('dummy.test.C', 'dummy.test.C', [], None),
|
('dummy.test.C', 'dummy.test.C', [], None),
|
||||||
('dummy.test.E', 'dummy.test.E', ['dummy.test.B'], None),
|
('dummy.test.E', 'dummy.test.E', ['dummy.test.B'], None),
|
||||||
('dummy.test.D', 'dummy.test.D',
|
('dummy.test.D', 'dummy.test.D', ['dummy.test.B', 'dummy.test.C'], None),
|
||||||
['dummy.test.B', 'dummy.test.C'], None),
|
('dummy.test.B', 'dummy.test.B', [], None)
|
||||||
('dummy.test.B', 'dummy.test.B', [], None)
|
]
|
||||||
]
|
|
||||||
|
|
||||||
# inheritance diagram with 2 top classes and specifiying the entire module
|
# inheritance diagram with 2 top classes and specifiying the entire module
|
||||||
# rendering should be
|
# rendering should be
|
||||||
@ -123,11 +121,10 @@ def test_inheritance_diagram(app, status, warning):
|
|||||||
# this is a known issue.
|
# this is a known issue.
|
||||||
for cls in graphs['diagram_module_w_2_top_classes'].class_info:
|
for cls in graphs['diagram_module_w_2_top_classes'].class_info:
|
||||||
assert cls in [
|
assert cls in [
|
||||||
('dummy.test.F', 'dummy.test.F', ['dummy.test.C'], None),
|
('dummy.test.F', 'dummy.test.F', ['dummy.test.C'], None),
|
||||||
('dummy.test.C', 'dummy.test.C', [], None),
|
('dummy.test.C', 'dummy.test.C', [], None),
|
||||||
('dummy.test.E', 'dummy.test.E', ['dummy.test.B'], None),
|
('dummy.test.E', 'dummy.test.E', ['dummy.test.B'], None),
|
||||||
('dummy.test.D', 'dummy.test.D',
|
('dummy.test.D', 'dummy.test.D', ['dummy.test.B', 'dummy.test.C'], None),
|
||||||
['dummy.test.B', 'dummy.test.C'], None),
|
('dummy.test.B', 'dummy.test.B', [], None),
|
||||||
('dummy.test.B', 'dummy.test.B', [], None),
|
('dummy.test.A', 'dummy.test.A', [], None),
|
||||||
('dummy.test.A', 'dummy.test.A', [], None),
|
]
|
||||||
]
|
|
||||||
|
@ -9,22 +9,22 @@
|
|||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
|
from io import BytesIO
|
||||||
|
|
||||||
from docutils import nodes
|
|
||||||
import mock
|
import mock
|
||||||
import pytest
|
import pytest
|
||||||
import requests
|
import requests
|
||||||
from io import BytesIO
|
from docutils import nodes
|
||||||
import os
|
from test_util_inventory import inventory_v2, inventory_v2_not_having_version
|
||||||
|
|
||||||
from sphinx import addnodes
|
from sphinx import addnodes
|
||||||
from sphinx.ext.intersphinx import setup as intersphinx_setup
|
|
||||||
from sphinx.ext.intersphinx import (
|
from sphinx.ext.intersphinx import (
|
||||||
load_mappings, missing_reference, _strip_basic_auth,
|
load_mappings, missing_reference, _strip_basic_auth,
|
||||||
_get_safe_url, fetch_inventory, INVENTORY_FILENAME, debug
|
_get_safe_url, fetch_inventory, INVENTORY_FILENAME, debug
|
||||||
)
|
)
|
||||||
from test_util_inventory import inventory_v2, inventory_v2_not_having_version
|
from sphinx.ext.intersphinx import setup as intersphinx_setup
|
||||||
|
|
||||||
|
|
||||||
def fake_node(domain, type, target, content, **attrs):
|
def fake_node(domain, type, target, content, **attrs):
|
||||||
|
@ -9,9 +9,8 @@
|
|||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
|
||||||
import re
|
|
||||||
import errno
|
import errno
|
||||||
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
@ -37,10 +36,12 @@ def test_jsmath(app, status, warning):
|
|||||||
content = (app.outdir / 'math.html').text()
|
content = (app.outdir / 'math.html').text()
|
||||||
|
|
||||||
assert '<div class="math notranslate">\na^2 + b^2 = c^2</div>' in content
|
assert '<div class="math notranslate">\na^2 + b^2 = c^2</div>' in content
|
||||||
assert '<div class="math notranslate">\n\\begin{split}a + 1 < b\\end{split}</div>' in content
|
assert ('<div class="math notranslate">\n\\begin{split}a + 1 < b\\end{split}</div>'
|
||||||
|
in content)
|
||||||
assert (u'<span class="eqno">(1)<a class="headerlink" href="#equation-foo" '
|
assert (u'<span class="eqno">(1)<a class="headerlink" href="#equation-foo" '
|
||||||
u'title="Permalink to this equation">\xb6</a></span>'
|
u'title="Permalink to this equation">\xb6</a></span>'
|
||||||
u'<div class="math notranslate" id="equation-foo">\ne^{i\\pi} = 1</div>' in content)
|
u'<div class="math notranslate" id="equation-foo">\ne^{i\\pi} = 1</div>'
|
||||||
|
in content)
|
||||||
assert (u'<span class="eqno">(2)<a class="headerlink" href="#equation-math-0" '
|
assert (u'<span class="eqno">(2)<a class="headerlink" href="#equation-math-0" '
|
||||||
u'title="Permalink to this equation">\xb6</a></span>'
|
u'title="Permalink to this equation">\xb6</a></span>'
|
||||||
u'<div class="math notranslate" id="equation-math-0">\n'
|
u'<div class="math notranslate" id="equation-math-0">\n'
|
||||||
|
@ -13,11 +13,11 @@
|
|||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
from sphinx.application import Sphinx
|
|
||||||
from sphinx.ext.napoleon import (_process_docstring, _skip_member, Config,
|
|
||||||
setup)
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
|
from sphinx.application import Sphinx
|
||||||
|
from sphinx.ext.napoleon import _process_docstring, _skip_member, Config, setup
|
||||||
|
|
||||||
|
|
||||||
def _private_doc():
|
def _private_doc():
|
||||||
"""module._private_doc.DOCSTRING"""
|
"""module._private_doc.DOCSTRING"""
|
||||||
|
@ -11,15 +11,14 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
# inspect.cleandoc() implements the trim() function from PEP 257
|
|
||||||
from inspect import cleandoc
|
from inspect import cleandoc
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
|
import mock
|
||||||
|
|
||||||
from sphinx.ext.napoleon import Config
|
from sphinx.ext.napoleon import Config
|
||||||
from sphinx.ext.napoleon.docstring import GoogleDocstring, NumpyDocstring
|
from sphinx.ext.napoleon.docstring import GoogleDocstring, NumpyDocstring
|
||||||
import mock
|
|
||||||
|
|
||||||
|
|
||||||
class NamedtupleSubclass(namedtuple('NamedtupleSubclass', ('attr1', 'attr2'))):
|
class NamedtupleSubclass(namedtuple('NamedtupleSubclass', ('attr1', 'attr2'))):
|
||||||
|
@ -10,9 +10,10 @@
|
|||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from sphinx.ext.napoleon.iterators import peek_iter, modify_iter
|
|
||||||
from unittest import TestCase
|
from unittest import TestCase
|
||||||
|
|
||||||
|
from sphinx.ext.napoleon.iterators import peek_iter, modify_iter
|
||||||
|
|
||||||
|
|
||||||
class BaseIteratorsTest(TestCase):
|
class BaseIteratorsTest(TestCase):
|
||||||
def assertEqualTwice(self, expected, func, *args):
|
def assertEqualTwice(self, expected, func, *args):
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
from pygments.formatters.html import HtmlFormatter
|
||||||
from pygments.lexer import RegexLexer
|
from pygments.lexer import RegexLexer
|
||||||
from pygments.token import Text, Name
|
from pygments.token import Text, Name
|
||||||
from pygments.formatters.html import HtmlFormatter
|
|
||||||
|
|
||||||
from sphinx.highlighting import PygmentsBridge
|
from sphinx.highlighting import PygmentsBridge
|
||||||
|
|
||||||
|
@ -12,13 +12,13 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
|
||||||
import pickle
|
import pickle
|
||||||
from docutils import nodes
|
import re
|
||||||
|
|
||||||
from babel.messages import pofile, mofile
|
|
||||||
from six import string_types
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from babel.messages import pofile, mofile
|
||||||
|
from docutils import nodes
|
||||||
|
from six import string_types
|
||||||
|
|
||||||
from sphinx.testing.util import (
|
from sphinx.testing.util import (
|
||||||
path, etree_parse, strip_escseq,
|
path, etree_parse, strip_escseq,
|
||||||
|
@ -9,21 +9,20 @@
|
|||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import re
|
|
||||||
import pickle
|
import pickle
|
||||||
|
import re
|
||||||
|
|
||||||
|
import pytest
|
||||||
from docutils import frontend, utils, nodes
|
from docutils import frontend, utils, nodes
|
||||||
from docutils.parsers.rst import Parser as RstParser
|
from docutils.parsers.rst import Parser as RstParser
|
||||||
from docutils.transforms.universal import SmartQuotes
|
from docutils.transforms.universal import SmartQuotes
|
||||||
|
|
||||||
from sphinx import addnodes
|
from sphinx import addnodes
|
||||||
|
from sphinx.testing.util import assert_node
|
||||||
from sphinx.util import texescape
|
from sphinx.util import texescape
|
||||||
from sphinx.util.docutils import sphinx_domains
|
from sphinx.util.docutils import sphinx_domains
|
||||||
from sphinx.writers.html import HTMLWriter, HTMLTranslator
|
from sphinx.writers.html import HTMLWriter, HTMLTranslator
|
||||||
from sphinx.writers.latex import LaTeXWriter, LaTeXTranslator
|
from sphinx.writers.latex import LaTeXWriter, LaTeXTranslator
|
||||||
import pytest
|
|
||||||
|
|
||||||
from sphinx.testing.util import assert_node
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from six import PY2
|
from six import PY2
|
||||||
|
|
||||||
import sphinx
|
import sphinx
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
|
||||||
|
import pytest
|
||||||
from six import PY2, text_type, StringIO
|
from six import PY2, text_type, StringIO
|
||||||
from six.moves import input
|
from six.moves import input
|
||||||
import pytest
|
|
||||||
|
|
||||||
from sphinx import application
|
from sphinx import application
|
||||||
from sphinx.cmd import quickstart as qs
|
from sphinx.cmd import quickstart as qs
|
||||||
|
@ -11,13 +11,13 @@
|
|||||||
|
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
|
|
||||||
from six import BytesIO
|
import pytest
|
||||||
from docutils import frontend, utils
|
from docutils import frontend, utils
|
||||||
from docutils.parsers import rst
|
from docutils.parsers import rst
|
||||||
|
from six import BytesIO
|
||||||
|
|
||||||
from sphinx.search import IndexBuilder
|
from sphinx.search import IndexBuilder
|
||||||
from sphinx.util import jsdump
|
from sphinx.util import jsdump
|
||||||
import pytest
|
|
||||||
|
|
||||||
DummyEnvironment = namedtuple('DummyEnvironment', ['version', 'domains'])
|
DummyEnvironment = namedtuple('DummyEnvironment', ['version', 'domains'])
|
||||||
|
|
||||||
|
@ -10,15 +10,15 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
from collections import namedtuple
|
from collections import namedtuple
|
||||||
import sphinx
|
from textwrap import dedent
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
import sphinx
|
||||||
from sphinx.util.osutil import cd
|
from sphinx.util.osutil import cd
|
||||||
from textwrap import dedent
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from sphinx.util import docutils
|
from sphinx.util import docutils
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from sphinx.ext.autosummary.generate import setup_documenters
|
from sphinx.ext.autosummary.generate import setup_documenters
|
||||||
|
|
||||||
|
|
||||||
|
@ -12,12 +12,11 @@
|
|||||||
import pytest
|
import pytest
|
||||||
from mock import patch
|
from mock import patch
|
||||||
|
|
||||||
from sphinx.util import logging
|
from sphinx.testing.util import strip_escseq
|
||||||
from sphinx.util import (
|
from sphinx.util import (
|
||||||
display_chunk, encode_uri, parselinenos, status_iterator, xmlname_checker
|
display_chunk, encode_uri, parselinenos, status_iterator, xmlname_checker
|
||||||
)
|
)
|
||||||
|
from sphinx.util import logging
|
||||||
from sphinx.testing.util import strip_escseq
|
|
||||||
|
|
||||||
|
|
||||||
def test_encode_uri():
|
def test_encode_uri():
|
||||||
|
@ -8,11 +8,12 @@
|
|||||||
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
|
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
|
||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
from sphinx.util.fileutil import copy_asset, copy_asset_file
|
|
||||||
from sphinx.jinja2glue import BuiltinTemplateLoader
|
|
||||||
|
|
||||||
import mock
|
import mock
|
||||||
|
|
||||||
|
from sphinx.jinja2glue import BuiltinTemplateLoader
|
||||||
|
from sphinx.util.fileutil import copy_asset, copy_asset_file
|
||||||
|
|
||||||
|
|
||||||
class DummyTemplateLoader(BuiltinTemplateLoader):
|
class DummyTemplateLoader(BuiltinTemplateLoader):
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
@ -10,13 +10,14 @@
|
|||||||
"""
|
"""
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import os
|
|
||||||
import datetime
|
import datetime
|
||||||
|
import os
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from babel.messages.mofile import read_mo
|
from babel.messages.mofile import read_mo
|
||||||
from sphinx.util import i18n
|
|
||||||
from sphinx.errors import SphinxError
|
from sphinx.errors import SphinxError
|
||||||
|
from sphinx.util import i18n
|
||||||
|
|
||||||
|
|
||||||
def test_catalog_info_for_file_and_path():
|
def test_catalog_info_for_file_and_path():
|
||||||
|
@ -8,11 +8,12 @@
|
|||||||
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
|
:copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS.
|
||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
import sys
|
|
||||||
from six import PY3
|
|
||||||
import functools
|
import functools
|
||||||
|
import sys
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from six import PY3
|
||||||
|
|
||||||
from sphinx.util import inspect
|
from sphinx.util import inspect
|
||||||
|
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import zlib
|
|
||||||
import posixpath
|
import posixpath
|
||||||
|
import zlib
|
||||||
|
|
||||||
from six import BytesIO
|
from six import BytesIO
|
||||||
|
|
||||||
|
@ -11,19 +11,18 @@
|
|||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
|
|
||||||
import codecs
|
import codecs
|
||||||
|
import os
|
||||||
|
|
||||||
|
import pytest
|
||||||
from docutils import nodes
|
from docutils import nodes
|
||||||
|
|
||||||
from sphinx.errors import SphinxWarning
|
from sphinx.errors import SphinxWarning
|
||||||
|
from sphinx.testing.util import strip_escseq
|
||||||
from sphinx.util import logging
|
from sphinx.util import logging
|
||||||
from sphinx.util.console import colorize
|
from sphinx.util.console import colorize
|
||||||
from sphinx.util.logging import is_suppressed_warning
|
from sphinx.util.logging import is_suppressed_warning
|
||||||
from sphinx.util.parallel import ParallelTasks
|
from sphinx.util.parallel import ParallelTasks
|
||||||
|
|
||||||
import pytest
|
|
||||||
from sphinx.testing.util import strip_escseq
|
|
||||||
|
|
||||||
import os
|
|
||||||
|
|
||||||
|
|
||||||
def test_info_and_warning(app, status, warning):
|
def test_info_and_warning(app, status, warning):
|
||||||
app.verbosity = 2
|
app.verbosity = 2
|
||||||
|
@ -10,14 +10,14 @@
|
|||||||
"""
|
"""
|
||||||
from textwrap import dedent
|
from textwrap import dedent
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
from docutils import frontend
|
||||||
from docutils import nodes
|
from docutils import nodes
|
||||||
from docutils.parsers import rst
|
from docutils.parsers import rst
|
||||||
from docutils.utils import new_document
|
from docutils.utils import new_document
|
||||||
from docutils import frontend
|
|
||||||
|
|
||||||
from sphinx.util.nodes import extract_messages, clean_astext
|
|
||||||
from sphinx.transforms import ApplySourceWorkaround
|
from sphinx.transforms import ApplySourceWorkaround
|
||||||
import pytest
|
from sphinx.util.nodes import extract_messages, clean_astext
|
||||||
|
|
||||||
|
|
||||||
def _transform(doctree):
|
def _transform(doctree):
|
||||||
|
@ -15,9 +15,8 @@ import pytest
|
|||||||
from docutils.parsers.rst.directives.html import MetaBody
|
from docutils.parsers.rst.directives.html import MetaBody
|
||||||
|
|
||||||
from sphinx import addnodes
|
from sphinx import addnodes
|
||||||
from sphinx.versioning import add_uids, merge_doctrees, get_ratio
|
|
||||||
|
|
||||||
from sphinx.testing.util import SphinxTestApp
|
from sphinx.testing.util import SphinxTestApp
|
||||||
|
from sphinx.versioning import add_uids, merge_doctrees, get_ratio
|
||||||
|
|
||||||
|
|
||||||
app = original = original_uids = None
|
app = original = original_uids = None
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
|
||||||
from sphinx.websupport import WebSupport
|
from sphinx.websupport import WebSupport
|
||||||
try:
|
try:
|
||||||
sqlalchemy_missing = False
|
sqlalchemy_missing = False
|
||||||
@ -16,8 +18,6 @@ try:
|
|||||||
except ImportError:
|
except ImportError:
|
||||||
sqlalchemy_missing = True
|
sqlalchemy_missing = True
|
||||||
|
|
||||||
import pytest
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.skipif(sqlalchemy_missing, reason='needs sqlalchemy')
|
@pytest.mark.skipif(sqlalchemy_missing, reason='needs sqlalchemy')
|
||||||
def test_build(request, rootdir, sphinx_test_tempdir):
|
def test_build(request, rootdir, sphinx_test_tempdir):
|
||||||
|
@ -9,10 +9,11 @@
|
|||||||
:license: BSD, see LICENSE for details.
|
:license: BSD, see LICENSE for details.
|
||||||
"""
|
"""
|
||||||
from __future__ import print_function
|
from __future__ import print_function
|
||||||
from sphinx.writers.latex import rstdim_to_latexdim
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
from sphinx.writers.latex import rstdim_to_latexdim
|
||||||
|
|
||||||
|
|
||||||
def test_rstdim_to_latexdim():
|
def test_rstdim_to_latexdim():
|
||||||
# Length units docutils supported
|
# Length units docutils supported
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
from typing import List, TypeVar, Union, Callable, Tuple
|
|
||||||
|
|
||||||
from numbers import Integral
|
from numbers import Integral
|
||||||
|
from typing import List, TypeVar, Union, Callable, Tuple
|
||||||
|
|
||||||
|
|
||||||
def f0(x: int, y: Integral) -> None:
|
def f0(x: int, y: Integral) -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user