instance_id
stringlengths
65
198
instance_type
stringclasses
2 values
task_type
stringclasses
1 value
repo_url
stringclasses
21 values
commit
stringlengths
40
40
fm_type
stringclasses
2 values
fm_name
stringlengths
1
93
pyfile_name
stringlengths
5
61
original_code
stringlengths
18
106k
gold_code
stringlengths
17
356k
old_filtered_context
stringlengths
24
362k
old_complete_context
stringlengths
93
363k
new_filtered_context
stringlengths
11
315k
new_complete_context
stringlengths
157
367k
initial_error_log
stringlengths
146
49.4M
gold_summary
stringclasses
723 values
original_summary
stringlengths
123
141
pyfile_path
stringlengths
18
101
unittest_path
stringlengths
18
101
13_sphinx_callee__io__new_document__aefab514e2bbce775a00c1aaae057044a02033fb
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
aefab514e2bbce775a00c1aaae057044a02033fb
method
new_document
io.py
def new_document(self): document = SphinxBaseReader.new_document(self) reporter = document.reporter def get_source_and_line(lineno=None): return reporter.source, self.lineno reporter.get_source_and_line = get_source_and_line return document
def new_document(self) -> nodes.document: """ Creates a new document object which has a special reporter object good for logging. """ document = super().new_document() # replace the class with patched version document.__class__ = addnodes.document # substitute transformer document.t...
# -*- coding: utf-8 -*- """ sphinx.io ~~~~~~~~~ Input/Output files :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from docutils.io import FileInput from docutils.readers import standalone from docutils.writers import UnfilteredWriter fr...
# -*- coding: utf-8 -*- """ sphinx.io ~~~~~~~~~ Input/Output files :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from docutils.io import FileInput from docutils.readers import standalone from docutils.writers import UnfilteredWriter fr...
"""Input/Output files""" from __future__ import annotations from typing import TYPE_CHECKING, Any from docutils.core import Publisher from docutils.io import FileInput, Input, NullOutput from docutils.readers import standalone from docutils.transforms.references import DanglingReferences from docutils.writers import...
"""Input/Output files""" from __future__ import annotations from typing import TYPE_CHECKING, Any from docutils.core import Publisher from docutils.io import FileInput, Input, NullOutput from docutils.readers import standalone from docutils.transforms.references import DanglingReferences from docutils.writers import...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 10, 'passed': 10, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 10, 'passed': 9, 'xpassed': 0, 'failed': 1, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/io.py
./test_repo/tests/test_quickstart.py
13_sphinx_callee__io__read__aefab514e2bbce775a00c1aaae057044a02033fb
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
aefab514e2bbce775a00c1aaae057044a02033fb
method
read
io.py
def read(self, source, parser, settings): self.source = source for suffix in self.parser_map: if source.source_path.endswith(suffix): self.parser = self.parser_map[suffix] break if not self.parser: self.parser = parser self.settings = settings self.input = s...
# type: ignore[type-arg] def read(self, source: Input, parser: Parser, settings: Values) -> nodes.document: self.source = source if not self.parser: # type: ignore[has-type] self.parser = parser self.settings = settings self.input = self.read_source(settings.env) self.parse() return sel...
# -*- coding: utf-8 -*- """ sphinx.io ~~~~~~~~~ Input/Output files :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from docutils.io import FileInput from docutils.readers import standalone from docutils.writers import UnfilteredWriter fr...
# -*- coding: utf-8 -*- """ sphinx.io ~~~~~~~~~ Input/Output files :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from docutils.io import FileInput from docutils.readers import standalone from docutils.writers import UnfilteredWriter fr...
"""Input/Output files""" from __future__ import annotations from typing import TYPE_CHECKING, Any from docutils.core import Publisher from docutils.io import FileInput, Input, NullOutput from docutils.readers import standalone from docutils.transforms.references import DanglingReferences from docutils.writers import...
"""Input/Output files""" from __future__ import annotations from typing import TYPE_CHECKING, Any from docutils.core import Publisher from docutils.io import FileInput, Input, NullOutput from docutils.readers import standalone from docutils.transforms.references import DanglingReferences from docutils.writers import...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 10, 'passed': 10, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 10, 'passed': 9, 'xpassed': 0, 'failed': 1, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/io.py
./test_repo/tests/test_quickstart.py
13_sphinx_callee__io__read_source__608246b0fa56a92f27b04a5b248ba59a204aaf89
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
608246b0fa56a92f27b04a5b248ba59a204aaf89
method
read_source
io.py
def read_source(self): # type: () -> str """Read content from source and do post-process.""" content = self.source.read() # emit "source-read" event arg = [content] self.app.emit('source-read', self.env.docname, arg) return arg[0]
def read_source(self, env: BuildEnvironment) -> str: """Read content from source and do post-process.""" content = self.source.read() # emit "source-read" event arg = [content] env.events.emit('source-read', env.docname, arg) return arg[0]
# -*- coding: utf-8 -*- """ sphinx.io ~~~~~~~~~ Input/Output files :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import codecs import warnings from docutils.core import Publisher from docutils.io import FileInput, NullOutput from docu...
# -*- coding: utf-8 -*- """ sphinx.io ~~~~~~~~~ Input/Output files :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import codecs import warnings from docutils.core import Publisher from docutils.io import FileInput, NullOutput from docu...
"""Input/Output files""" from __future__ import annotations from typing import TYPE_CHECKING, Any from docutils.core import Publisher from docutils.io import FileInput, Input, NullOutput from docutils.readers import standalone from docutils.transforms.references import DanglingReferences from docutils.writers import...
"""Input/Output files""" from __future__ import annotations from typing import TYPE_CHECKING, Any from docutils.core import Publisher from docutils.io import FileInput, Input, NullOutput from docutils.readers import standalone from docutils.transforms.references import DanglingReferences from docutils.writers import...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 10, 'passed': 10, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 10, 'passed': 9, 'xpassed': 0, 'failed': 1, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/io.py
./test_repo/tests/test_quickstart.py
13_sphinx_callee__util__cleanup__d497d743700704b10dc081c2a7d3508282155526
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
d497d743700704b10dc081c2a7d3508282155526
method
cleanup
util.py
def cleanup(self, doctrees=False): AutoDirective._registry.clear() ModuleAnalyzer.cache.clear() LaTeXBuilder.usepackages = [] sys.path[:] = self._saved_path sys.modules.pop('autodoc_fodder', None) directives._directives = self._saved_directives roles._roles = self._saved_roles for method...
def cleanup(self, doctrees: bool = False) -> None: sys.path[:] = self._saved_path _clean_up_global_state() with contextlib.suppress(FileNotFoundError): os.remove(self.docutils_conf_path)
# -*- coding: utf-8 -*- """ sphinx.testing.util ~~~~~~~~~~~~~~~~~~~ Sphinx test suite utilities :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import re import sys import warnings from functools import wraps from xml.etree imp...
# -*- coding: utf-8 -*- """ sphinx.testing.util ~~~~~~~~~~~~~~~~~~~ Sphinx test suite utilities :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import re import sys import warnings from functools import wraps from xml.etree imp...
"""Sphinx test suite utilities""" from __future__ import annotations __all__ = ('SphinxTestApp', 'SphinxTestAppWrapperForSkipBuilding') import contextlib import os import sys from io import StringIO from types import MappingProxyType from typing import TYPE_CHECKING from docutils import nodes from docutils.parsers....
"""Sphinx test suite utilities""" from __future__ import annotations __all__ = ('SphinxTestApp', 'SphinxTestAppWrapperForSkipBuilding') import contextlib import os import sys from io import StringIO from types import MappingProxyType from typing import TYPE_CHECKING from docutils import nodes from docutils.parsers....
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 10, 'passed': 10, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 10, 'passed': 9, 'xpassed': 0, 'failed': 1, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/testing/util.py
./test_repo/tests/test_quickstart.py
13_sphinx_callee__util__build__d497d743700704b10dc081c2a7d3508282155526
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
d497d743700704b10dc081c2a7d3508282155526
method
build
util.py
def build(self, *args, **kw): if not self.app.outdir.listdir(): # if listdir is empty, do build. self.app.build(*args, **kw)
def build(self, force_all: bool = False, filenames: list[str] | None = None) -> None: self.env._pickled_doctree_cache.clear() super().build(force_all, filenames)
# -*- coding: utf-8 -*- """ sphinx.testing.util ~~~~~~~~~~~~~~~~~~~ Sphinx test suite utilities :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import re import sys import warnings from functools import wraps from xml.etree imp...
# -*- coding: utf-8 -*- """ sphinx.testing.util ~~~~~~~~~~~~~~~~~~~ Sphinx test suite utilities :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import re import sys import warnings from functools import wraps from xml.etree imp...
"""Sphinx test suite utilities""" from __future__ import annotations __all__ = ('SphinxTestApp', 'SphinxTestAppWrapperForSkipBuilding') import contextlib import os import sys from io import StringIO from types import MappingProxyType from typing import TYPE_CHECKING from docutils import nodes from docutils.parsers....
"""Sphinx test suite utilities""" from __future__ import annotations __all__ = ('SphinxTestApp', 'SphinxTestAppWrapperForSkipBuilding') import contextlib import os import sys from io import StringIO from types import MappingProxyType from typing import TYPE_CHECKING from docutils import nodes from docutils.parsers....
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 10, 'passed': 10, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 10, 'passed': 9, 'xpassed': 0, 'failed': 1, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/testing/util.py
./test_repo/tests/test_quickstart.py
13_sphinx_callee__console__colorize__c110069db2a192ded7ac16c3895b233223b22e9b
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
c110069db2a192ded7ac16c3895b233223b22e9b
function
colorize
console.py
def colorize(name, text): return codes.get(name, '') + text + codes.get('reset', '')
def colorize(name: str, text: str, input_mode: bool = False) -> str: def escseq(name: str) -> str: # Wrap escape sequence with ``\1`` and ``\2`` to let readline know # it is non-printable characters # ref: https://tiswww.case.edu/php/chet/readline/readline.html # # Note: This...
# -*- coding: utf-8 -*- """ sphinx.util.console ~~~~~~~~~~~~~~~~~~~ Format colored console output. :copyright: 2007 by Georg Brandl. :license: Python license. """ codes = {} def nocolor(): codes.clear() def create_color_func(name): def inner(text): return colorize(name, text) ...
# -*- coding: utf-8 -*- """ sphinx.util.console ~~~~~~~~~~~~~~~~~~~ Format colored console output. :copyright: 2007 by Georg Brandl. :license: Python license. """ codes = {} def nocolor(): codes.clear() def colorize(name, text): return codes.get(name, '') + text + codes.get('reset', '...
"""Format colored console output.""" from __future__ import annotations import os import re import shutil import sys from typing import TYPE_CHECKING if TYPE_CHECKING: from typing import Final # fmt: off def reset(text: str) -> str: ... # NoQA: E704 def bold(text: str) -> str: ... # NoQA: E704 ...
"""Format colored console output.""" from __future__ import annotations import os import re import shutil import sys from typing import TYPE_CHECKING if TYPE_CHECKING: from typing import Final # fmt: off def reset(text: str) -> str: ... # NoQA: E704 def bold(text: str) -> str: ... # NoQA: E704 ...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 10, 'passed': 10, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 10, 'passed': 1, 'xpassed': 0, 'failed': 9, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/util/console.py
./test_repo/tests/test_quickstart.py
13_sphinx_callee__util__cleanup__d497d743700704b10dc081c2a7d3508282155526
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
d497d743700704b10dc081c2a7d3508282155526
method
cleanup
util.py
def cleanup(self, doctrees=False): AutoDirective._registry.clear() ModuleAnalyzer.cache.clear() LaTeXBuilder.usepackages = [] sys.path[:] = self._saved_path sys.modules.pop('autodoc_fodder', None) directives._directives = self._saved_directives roles._roles = self._saved_roles for method...
def cleanup(self, doctrees: bool = False) -> None: sys.path[:] = self._saved_path _clean_up_global_state() with contextlib.suppress(FileNotFoundError): os.remove(self.docutils_conf_path)
# -*- coding: utf-8 -*- """ sphinx.testing.util ~~~~~~~~~~~~~~~~~~~ Sphinx test suite utilities :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import re import sys import warnings from functools import wraps from xml.etree imp...
# -*- coding: utf-8 -*- """ sphinx.testing.util ~~~~~~~~~~~~~~~~~~~ Sphinx test suite utilities :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import re import sys import warnings from functools import wraps from xml.etree imp...
"""Sphinx test suite utilities""" from __future__ import annotations __all__ = ('SphinxTestApp', 'SphinxTestAppWrapperForSkipBuilding') import contextlib import os import sys from io import StringIO from types import MappingProxyType from typing import TYPE_CHECKING from docutils import nodes from docutils.parsers....
"""Sphinx test suite utilities""" from __future__ import annotations __all__ = ('SphinxTestApp', 'SphinxTestAppWrapperForSkipBuilding') import contextlib import os import sys from io import StringIO from types import MappingProxyType from typing import TYPE_CHECKING from docutils import nodes from docutils.parsers....
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 10, 'passed': 10, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 11, 'passed': 10, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 1}
./test_repo/sphinx/testing/util.py
./test_repo/tests/test_versioning.py
13_sphinx_callee__util__build__d497d743700704b10dc081c2a7d3508282155526
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
d497d743700704b10dc081c2a7d3508282155526
method
build
util.py
def build(self, *args, **kw): if not self.app.outdir.listdir(): # if listdir is empty, do build. self.app.build(*args, **kw)
def build(self, force_all: bool = False, filenames: list[str] | None = None) -> None: self.env._pickled_doctree_cache.clear() super().build(force_all, filenames)
# -*- coding: utf-8 -*- """ sphinx.testing.util ~~~~~~~~~~~~~~~~~~~ Sphinx test suite utilities :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import re import sys import warnings from functools import wraps from xml.etree imp...
# -*- coding: utf-8 -*- """ sphinx.testing.util ~~~~~~~~~~~~~~~~~~~ Sphinx test suite utilities :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import re import sys import warnings from functools import wraps from xml.etree imp...
"""Sphinx test suite utilities""" from __future__ import annotations __all__ = ('SphinxTestApp', 'SphinxTestAppWrapperForSkipBuilding') import contextlib import os import sys from io import StringIO from types import MappingProxyType from typing import TYPE_CHECKING from docutils import nodes from docutils.parsers....
"""Sphinx test suite utilities""" from __future__ import annotations __all__ = ('SphinxTestApp', 'SphinxTestAppWrapperForSkipBuilding') import contextlib import os import sys from io import StringIO from types import MappingProxyType from typing import TYPE_CHECKING from docutils import nodes from docutils.parsers....
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 10, 'passed': 10, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 10, 'passed': 0, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 10}
./test_repo/sphinx/testing/util.py
./test_repo/tests/test_versioning.py
13_sphinx_callee__versioning__merge_doctrees__828ad48e3de5036e1fc7e48f6687976abdb34f56
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
828ad48e3de5036e1fc7e48f6687976abdb34f56
function
merge_doctrees
versioning.py
def merge_doctrees(old, new, condition): """ Merges the `old` doctree with the `new` one while looking at nodes matching the `condition`. Each node which replaces another one or has been added to the `new` doctree will be yielded. :param condition: A callable which returns either ``Tru...
def merge_doctrees( old: Node, new: Node, condition: Callable[[Node], bool] ) -> Iterator[Node]: """Merge the `old` doctree with the `new` one while looking at nodes matching the `condition`. Each node which replaces another one or has been added to the `new` doctree will be yielded. :param co...
# -*- coding: utf-8 -*- """ sphinx.versioning ~~~~~~~~~~~~~~~~~ Implements the low-level algorithms Sphinx uses for the versioning of doctrees. :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from uuid import uuid4 from itertools imp...
# -*- coding: utf-8 -*- """ sphinx.versioning ~~~~~~~~~~~~~~~~~ Implements the low-level algorithms Sphinx uses for the versioning of doctrees. :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from uuid import uuid4 from itertools imp...
"""Implements the low-level algorithms Sphinx uses for versioning doctrees.""" from __future__ import annotations import pickle from itertools import product, zip_longest from operator import itemgetter from os import path from typing import TYPE_CHECKING, Any from uuid import uuid4 from sphinx.transforms import Sph...
"""Implements the low-level algorithms Sphinx uses for versioning doctrees.""" from __future__ import annotations import pickle from itertools import product, zip_longest from operator import itemgetter from os import path from typing import TYPE_CHECKING, Any from uuid import uuid4 from sphinx.transforms import Sph...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 10, 'passed': 10, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 10, 'passed': 3, 'xpassed': 0, 'failed': 7, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/versioning.py
./test_repo/tests/test_versioning.py
13_sphinx_callee__versioning__get_ratio__85b8a451a696c13d4644d4da900c2bcb31de4010
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
85b8a451a696c13d4644d4da900c2bcb31de4010
function
get_ratio
versioning.py
def get_ratio(old, new): """ Returns a "similiarity ratio" representing the similarity between the two strings where 0 is equal and anything above less than equal. """ if old == new: return 0 ratio = levenshtein_distance(old, new) / (len(old) / 100.0) return ratio
def get_ratio(old: str, new: str) -> float: """Return a "similarity ratio" (in percent) representing the similarity between the two strings where 0 is equal and anything above less than equal. """ if not all([old, new]): return VERSIONING_RATIO if IS_SPEEDUP: return Levenshtein.dist...
# -*- coding: utf-8 -*- """ sphinx.versioning ~~~~~~~~~~~~~~~~~ Implements the low-level algorithms Sphinx uses for the versioning of doctrees. :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from uuid import uuid4 from operator impo...
# -*- coding: utf-8 -*- """ sphinx.versioning ~~~~~~~~~~~~~~~~~ Implements the low-level algorithms Sphinx uses for the versioning of doctrees. :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from uuid import uuid4 from operator impo...
"""Implements the low-level algorithms Sphinx uses for versioning doctrees.""" from __future__ import annotations import pickle from itertools import product, zip_longest from operator import itemgetter from os import path from typing import TYPE_CHECKING, Any from uuid import uuid4 from sphinx.transforms import Sph...
"""Implements the low-level algorithms Sphinx uses for versioning doctrees.""" from __future__ import annotations import pickle from itertools import product, zip_longest from operator import itemgetter from os import path from typing import TYPE_CHECKING, Any from uuid import uuid4 from sphinx.transforms import Sph...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 10, 'passed': 10, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 10, 'passed': 9, 'xpassed': 0, 'failed': 1, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/versioning.py
./test_repo/tests/test_versioning.py
13_sphinx_callee__versioning__levenshtein_distance__828ad48e3de5036e1fc7e48f6687976abdb34f56
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
828ad48e3de5036e1fc7e48f6687976abdb34f56
function
levenshtein_distance
versioning.py
def levenshtein_distance(a, b): if len(a) < len(b): a, b = b, a if not a: return len(b) previous_row = xrange(len(b) + 1) for i, column1 in enumerate(a): current_row = [i + 1] for j, column2 in enumerate(b): insertions = previous_row[j + 1] + 1 del...
def levenshtein_distance(a: str, b: str) -> int: """Return the Levenshtein edit distance between two strings *a* and *b*.""" if a == b: return 0 if len(a) < len(b): a, b = b, a if not a: return len(b) previous_row = list(range(len(b) + 1)) for i, column1 in enumerate(a): ...
# -*- coding: utf-8 -*- """ sphinx.versioning ~~~~~~~~~~~~~~~~~ Implements the low-level algorithms Sphinx uses for the versioning of doctrees. :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from uuid import uuid4 from itertools imp...
# -*- coding: utf-8 -*- """ sphinx.versioning ~~~~~~~~~~~~~~~~~ Implements the low-level algorithms Sphinx uses for the versioning of doctrees. :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from uuid import uuid4 from itertools imp...
"""Implements the low-level algorithms Sphinx uses for versioning doctrees.""" from __future__ import annotations import pickle from itertools import product, zip_longest from operator import itemgetter from os import path from typing import TYPE_CHECKING, Any from uuid import uuid4 from sphinx.transforms import Sph...
"""Implements the low-level algorithms Sphinx uses for versioning doctrees.""" from __future__ import annotations import pickle from itertools import product, zip_longest from operator import itemgetter from os import path from typing import TYPE_CHECKING, Any from uuid import uuid4 from sphinx.transforms import Sph...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 10, 'passed': 10, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 10, 'passed': 3, 'xpassed': 0, 'failed': 7, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/versioning.py
./test_repo/tests/test_versioning.py
13_sphinx_callee__versioning__apply__7fab902561f2153e8c07b3bfd1368b148dca93a8
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
7fab902561f2153e8c07b3bfd1368b148dca93a8
method
apply
versioning.py
def apply(self): env = self.env old_doctree = None if env.versioning_compare: # get old doctree try: filename = env.doc2path(env.docname, env.doctreedir, '.doctree') with open(filename, 'rb') as f: old_doctree = pickle.load(f) except Environmen...
def apply(self, **kwargs: Any) -> None: env = self.env old_doctree = None versioning_condition = env.versioning_condition if not versioning_condition: return if env.versioning_compare: # get old doctree try: filename = path.join(env.doctreedir, env.docname + '.do...
# -*- coding: utf-8 -*- """ sphinx.versioning ~~~~~~~~~~~~~~~~~ Implements the low-level algorithms Sphinx uses for the versioning of doctrees. :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from uuid import uuid4 from operator impo...
# -*- coding: utf-8 -*- """ sphinx.versioning ~~~~~~~~~~~~~~~~~ Implements the low-level algorithms Sphinx uses for the versioning of doctrees. :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from uuid import uuid4 from operator impo...
"""Implements the low-level algorithms Sphinx uses for versioning doctrees.""" from __future__ import annotations import pickle from itertools import product, zip_longest from operator import itemgetter from os import path from typing import TYPE_CHECKING, Any from uuid import uuid4 from sphinx.transforms import Sph...
"""Implements the low-level algorithms Sphinx uses for versioning doctrees.""" from __future__ import annotations import pickle from itertools import product, zip_longest from operator import itemgetter from os import path from typing import TYPE_CHECKING, Any from uuid import uuid4 from sphinx.transforms import Sph...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 10, 'passed': 10, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 10, 'passed': 0, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 10}
./test_repo/sphinx/versioning.py
./test_repo/tests/test_versioning.py
13_sphinx_callee__build__get_parser__d277a01242c3b39bf2f7c47886a8046e2f0fbc5b
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
d277a01242c3b39bf2f7c47886a8046e2f0fbc5b
function
get_parser
build.py
def get_parser(): # type: () -> argparse.ArgumentParser parser = argparse.ArgumentParser( usage='usage: %(prog)s [OPTIONS] SOURCEDIR OUTPUTDIR [FILENAMES...]', epilog='For more information, visit <http://sphinx-doc.org/>.', description=""" Generate documentation from source files. sphin...
def get_parser() -> argparse.ArgumentParser: parser = argparse.ArgumentParser( usage='%(prog)s [OPTIONS] SOURCEDIR OUTPUTDIR [FILENAMES...]', epilog=__('For more information, visit <https://www.sphinx-doc.org/>.'), description=__(""" Generate documentation from source files. sphinx-build ge...
# -*- coding: utf-8 -*- """ sphinx.cmdline ~~~~~~~~~~~~~~ sphinx-build command-line handling. :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function import argparse import multiprocessing import os import ...
# -*- coding: utf-8 -*- """ sphinx.cmdline ~~~~~~~~~~~~~~ sphinx-build command-line handling. :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function import argparse import multiprocessing import os import ...
"""Build documentation from a provided source.""" from __future__ import annotations import argparse import bdb import contextlib import locale import multiprocessing import os import pdb # NoQA: T100 import sys import traceback from os import path from typing import TYPE_CHECKING, Any, TextIO from docutils.utils i...
"""Build documentation from a provided source.""" from __future__ import annotations import argparse import bdb import contextlib import locale import multiprocessing import os import pdb # NoQA: T100 import sys import traceback from os import path from typing import TYPE_CHECKING, Any, TextIO from docutils.utils i...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 10, 'passed': 8, 'xpassed': 0, 'failed': 0, 'xfailed': 2, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 1, 'passed': 0, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 1}
./test_repo/sphinx/cmd/build.py
./test_repo/tests/test_command_line.py
13_sphinx_callee__make_mode__run_make_mode__b0c3a8fc8e00b31899eca0859b63e1e38f76d58e
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
b0c3a8fc8e00b31899eca0859b63e1e38f76d58e
function
run_make_mode
make_mode.py
def run_make_mode(args): # type: (List[unicode]) -> int if len(args) < 3: print('Error: at least 3 arguments (builder, source ' 'dir, build dir) are required.', file=sys.stderr) return 1 make = Make(args[1], args[2], args[3:]) run_method = 'build_' + args[0] if hasattr(...
def run_make_mode(args: Sequence[str]) -> int: if len(args) < 3: print('Error: at least 3 arguments (builder, source ' 'dir, build dir) are required.', file=sys.stderr) return 1 builder_name = args[0] make = Make(source_dir=args[1], build_dir=args[2], opts=args[3:]) run_me...
# -*- coding: utf-8 -*- """ sphinx.cmd.make_mode ~~~~~~~~~~~~~~~~~~~~ sphinx-build -M command-line handling. This replaces the old, platform-dependent and once-generated content of Makefile / make.bat. This is in its own module so that importing it is fast. It should not import the main ...
# -*- coding: utf-8 -*- """ sphinx.cmd.make_mode ~~~~~~~~~~~~~~~~~~~~ sphinx-build -M command-line handling. This replaces the old, platform-dependent and once-generated content of Makefile / make.bat. This is in its own module so that importing it is fast. It should not import the main ...
"""sphinx-build -M command-line handling. This replaces the old, platform-dependent and once-generated content of Makefile / make.bat. This is in its own module so that importing it is fast. It should not import the main Sphinx modules (like sphinx.applications, sphinx.builders). """ from __future__ import annotati...
"""sphinx-build -M command-line handling. This replaces the old, platform-dependent and once-generated content of Makefile / make.bat. This is in its own module so that importing it is fast. It should not import the main Sphinx modules (like sphinx.applications, sphinx.builders). """ from __future__ import annotati...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 10, 'passed': 8, 'xpassed': 0, 'failed': 0, 'xfailed': 2, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 10, 'passed': 4, 'xpassed': 0, 'failed': 4, 'xfailed': 2, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/cmd/make_mode.py
./test_repo/tests/test_command_line.py
13_sphinx_callee__make_mode__run_generic_build__b0c3a8fc8e00b31899eca0859b63e1e38f76d58e
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
b0c3a8fc8e00b31899eca0859b63e1e38f76d58e
method
run_generic_build
make_mode.py
def run_generic_build(self, builder, doctreedir=None): # type: (unicode, unicode) -> int # compatibility with old Makefile papersize = os.getenv('PAPER', '') opts = self.opts if papersize in ('a4', 'letter'): opts.extend(['-D', 'latex_elements.papersize=' + papersize]) if doctreedir is N...
def run_generic_build(self, builder: str, doctreedir: str | None = None) -> int: # compatibility with old Makefile paper_size = os.getenv('PAPER', '') if paper_size in {'a4', 'letter'}: self.opts.extend(['-D', f'latex_elements.papersize={paper_size}paper']) if doctreedir is None: doctree...
# -*- coding: utf-8 -*- """ sphinx.cmd.make_mode ~~~~~~~~~~~~~~~~~~~~ sphinx-build -M command-line handling. This replaces the old, platform-dependent and once-generated content of Makefile / make.bat. This is in its own module so that importing it is fast. It should not import the main ...
# -*- coding: utf-8 -*- """ sphinx.cmd.make_mode ~~~~~~~~~~~~~~~~~~~~ sphinx-build -M command-line handling. This replaces the old, platform-dependent and once-generated content of Makefile / make.bat. This is in its own module so that importing it is fast. It should not import the main ...
"""sphinx-build -M command-line handling. This replaces the old, platform-dependent and once-generated content of Makefile / make.bat. This is in its own module so that importing it is fast. It should not import the main Sphinx modules (like sphinx.applications, sphinx.builders). """ from __future__ import annotati...
"""sphinx-build -M command-line handling. This replaces the old, platform-dependent and once-generated content of Makefile / make.bat. This is in its own module so that importing it is fast. It should not import the main Sphinx modules (like sphinx.applications, sphinx.builders). """ from __future__ import annotati...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 10, 'passed': 8, 'xpassed': 0, 'failed': 0, 'xfailed': 2, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 10, 'passed': 4, 'xpassed': 0, 'failed': 4, 'xfailed': 2, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/cmd/make_mode.py
./test_repo/tests/test_command_line.py
13_sphinx_callee__io__setup__0e86ff2f1133e529d148cea6cc235218d73cc7d4
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
0e86ff2f1133e529d148cea6cc235218d73cc7d4
method
setup
io.py
def setup(app): app.registry.add_source_input('*', SphinxFileInput) app.registry.add_source_input('restructuredtext', SphinxRSTFileInput)
def setup(self, app: Sphinx) -> None: self._app = app # hold application object only for compatibility self._env = app.env
# -*- coding: utf-8 -*- """ sphinx.io ~~~~~~~~~ Input/Output files :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import codecs from docutils.io import FileInput, NullOutput from docutils.core import Publisher from docutils.readers imp...
# -*- coding: utf-8 -*- """ sphinx.io ~~~~~~~~~ Input/Output files :copyright: Copyright 2007-2017 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import codecs from docutils.io import FileInput, NullOutput from docutils.core import Publisher from docutils.readers imp...
"""Input/Output files""" from __future__ import annotations from typing import TYPE_CHECKING, Any from docutils.core import Publisher from docutils.io import FileInput, Input, NullOutput from docutils.readers import standalone from docutils.transforms.references import DanglingReferences from docutils.writers import...
"""Input/Output files""" from __future__ import annotations from typing import TYPE_CHECKING, Any from docutils.core import Publisher from docutils.io import FileInput, Input, NullOutput from docutils.readers import standalone from docutils.transforms.references import DanglingReferences from docutils.writers import...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 17, 'passed': 17, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 17, 'passed': 2, 'xpassed': 0, 'failed': 15, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/io.py
./test_repo/tests/test_search.py
13_sphinx_callee__io__new_document__aefab514e2bbce775a00c1aaae057044a02033fb
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
aefab514e2bbce775a00c1aaae057044a02033fb
method
new_document
io.py
def new_document(self): document = SphinxBaseReader.new_document(self) reporter = document.reporter def get_source_and_line(lineno=None): return reporter.source, self.lineno reporter.get_source_and_line = get_source_and_line return document
def new_document(self) -> nodes.document: """ Creates a new document object which has a special reporter object good for logging. """ document = super().new_document() # replace the class with patched version document.__class__ = addnodes.document # substitute transformer document.t...
# -*- coding: utf-8 -*- """ sphinx.io ~~~~~~~~~ Input/Output files :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from docutils.io import FileInput from docutils.readers import standalone from docutils.writers import UnfilteredWriter fr...
# -*- coding: utf-8 -*- """ sphinx.io ~~~~~~~~~ Input/Output files :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from docutils.io import FileInput from docutils.readers import standalone from docutils.writers import UnfilteredWriter fr...
"""Input/Output files""" from __future__ import annotations from typing import TYPE_CHECKING, Any from docutils.core import Publisher from docutils.io import FileInput, Input, NullOutput from docutils.readers import standalone from docutils.transforms.references import DanglingReferences from docutils.writers import...
"""Input/Output files""" from __future__ import annotations from typing import TYPE_CHECKING, Any from docutils.core import Publisher from docutils.io import FileInput, Input, NullOutput from docutils.readers import standalone from docutils.transforms.references import DanglingReferences from docutils.writers import...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 17, 'passed': 17, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 17, 'passed': 2, 'xpassed': 0, 'failed': 15, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/io.py
./test_repo/tests/test_search.py
13_sphinx_callee__io__read__aefab514e2bbce775a00c1aaae057044a02033fb
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
aefab514e2bbce775a00c1aaae057044a02033fb
method
read
io.py
def read(self, source, parser, settings): self.source = source for suffix in self.parser_map: if source.source_path.endswith(suffix): self.parser = self.parser_map[suffix] break if not self.parser: self.parser = parser self.settings = settings self.input = s...
# type: ignore[type-arg] def read(self, source: Input, parser: Parser, settings: Values) -> nodes.document: self.source = source if not self.parser: # type: ignore[has-type] self.parser = parser self.settings = settings self.input = self.read_source(settings.env) self.parse() return sel...
# -*- coding: utf-8 -*- """ sphinx.io ~~~~~~~~~ Input/Output files :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from docutils.io import FileInput from docutils.readers import standalone from docutils.writers import UnfilteredWriter fr...
# -*- coding: utf-8 -*- """ sphinx.io ~~~~~~~~~ Input/Output files :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from docutils.io import FileInput from docutils.readers import standalone from docutils.writers import UnfilteredWriter fr...
"""Input/Output files""" from __future__ import annotations from typing import TYPE_CHECKING, Any from docutils.core import Publisher from docutils.io import FileInput, Input, NullOutput from docutils.readers import standalone from docutils.transforms.references import DanglingReferences from docutils.writers import...
"""Input/Output files""" from __future__ import annotations from typing import TYPE_CHECKING, Any from docutils.core import Publisher from docutils.io import FileInput, Input, NullOutput from docutils.readers import standalone from docutils.transforms.references import DanglingReferences from docutils.writers import...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 17, 'passed': 17, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 17, 'passed': 2, 'xpassed': 0, 'failed': 15, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/io.py
./test_repo/tests/test_search.py
13_sphinx_callee__io__read_source__608246b0fa56a92f27b04a5b248ba59a204aaf89
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
608246b0fa56a92f27b04a5b248ba59a204aaf89
method
read_source
io.py
def read_source(self): # type: () -> str """Read content from source and do post-process.""" content = self.source.read() # emit "source-read" event arg = [content] self.app.emit('source-read', self.env.docname, arg) return arg[0]
def read_source(self, env: BuildEnvironment) -> str: """Read content from source and do post-process.""" content = self.source.read() # emit "source-read" event arg = [content] env.events.emit('source-read', env.docname, arg) return arg[0]
# -*- coding: utf-8 -*- """ sphinx.io ~~~~~~~~~ Input/Output files :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import codecs import warnings from docutils.core import Publisher from docutils.io import FileInput, NullOutput from docu...
# -*- coding: utf-8 -*- """ sphinx.io ~~~~~~~~~ Input/Output files :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import codecs import warnings from docutils.core import Publisher from docutils.io import FileInput, NullOutput from docu...
"""Input/Output files""" from __future__ import annotations from typing import TYPE_CHECKING, Any from docutils.core import Publisher from docutils.io import FileInput, Input, NullOutput from docutils.readers import standalone from docutils.transforms.references import DanglingReferences from docutils.writers import...
"""Input/Output files""" from __future__ import annotations from typing import TYPE_CHECKING, Any from docutils.core import Publisher from docutils.io import FileInput, Input, NullOutput from docutils.readers import standalone from docutils.transforms.references import DanglingReferences from docutils.writers import...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 17, 'passed': 17, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 17, 'passed': 2, 'xpassed': 0, 'failed': 15, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/io.py
./test_repo/tests/test_search.py
13_sphinx_callee__docutils__new_document__c9f511ad197d55abd7ec4cd3e1705487842230ec
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
c9f511ad197d55abd7ec4cd3e1705487842230ec
function
new_document
docutils.py
def new_document(source_path, settings=None): # type: (unicode, Any) -> nodes.document """Return a new empty document object. This is an alternative of docutils'. This is a simple wrapper for ``docutils.utils.new_document()``. It caches the result of docutils' and use it on second call for instanciat...
def new_document(source_path: str, settings: Any = None) -> nodes.document: """Return a new empty document object. This is an alternative of docutils'. This is a simple wrapper for ``docutils.utils.new_document()``. It caches the result of docutils' and use it on second call for instantiation. This m...
# -*- coding: utf-8 -*- """ sphinx.util.docutils ~~~~~~~~~~~~~~~~~~~~ Utility functions for docutils. :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import absolute_import import re import types from contextlib import c...
# -*- coding: utf-8 -*- """ sphinx.util.docutils ~~~~~~~~~~~~~~~~~~~~ Utility functions for docutils. :copyright: Copyright 2007-2018 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import absolute_import import re import types from contextlib import c...
"""Utility functions for docutils.""" from __future__ import annotations import os import re from collections.abc import Sequence # NoQA: TCH003 from contextlib import contextmanager from copy import copy from os import path from typing import IO, TYPE_CHECKING, Any, cast import docutils from docutils import nodes ...
"""Utility functions for docutils.""" from __future__ import annotations import os import re from collections.abc import Sequence # NoQA: TCH003 from contextlib import contextmanager from copy import copy from os import path from typing import IO, TYPE_CHECKING, Any, cast import docutils from docutils import nodes ...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 17, 'passed': 17, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 17, 'passed': 2, 'xpassed': 0, 'failed': 15, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/util/docutils.py
./test_repo/tests/test_search.py
13_sphinx_callee__docutils__enable__50bf7960bd8aff516d0536b8c944896857d2ba71
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
50bf7960bd8aff516d0536b8c944896857d2ba71
method
enable
docutils.py
def enable(self): self.directive_func = directives.directive self.role_func = roles.role directives.directive = self.lookup_directive roles.role = self.lookup_role
def enable(self) -> None: self.directive_func = directives.directive self.role_func = roles.role directives.directive = self.directive # type: ignore[assignment] roles.role = self.role
# -*- coding: utf-8 -*- """ sphinx.util.docutils ~~~~~~~~~~~~~~~~~~~~ Utility functions for docutils. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import absolute_import from copy import copy from contextlib import co...
# -*- coding: utf-8 -*- """ sphinx.util.docutils ~~~~~~~~~~~~~~~~~~~~ Utility functions for docutils. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import absolute_import from copy import copy from contextlib import co...
"""Utility functions for docutils.""" from __future__ import annotations import os import re from collections.abc import Sequence # NoQA: TCH003 from contextlib import contextmanager from copy import copy from os import path from typing import IO, TYPE_CHECKING, Any, cast import docutils from docutils import nodes ...
"""Utility functions for docutils.""" from __future__ import annotations import os import re from collections.abc import Sequence # NoQA: TCH003 from contextlib import contextmanager from copy import copy from os import path from typing import IO, TYPE_CHECKING, Any, cast import docutils from docutils import nodes ...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 17, 'passed': 17, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 17, 'passed': 2, 'xpassed': 0, 'failed': 15, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/util/docutils.py
./test_repo/tests/test_search.py
13_sphinx_callee__docutils__write__fb227f24cba672b44b4b71d11ccef0ac891e2dd3
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
fb227f24cba672b44b4b71d11ccef0ac891e2dd3
method
write
docutils.py
def write(self, text): matched = report_re.search(text) if not matched: logger.warning(text.rstrip("\r\n")) else: location, type, level, message = matched.groups() if type in self.level_mapping: logger_method = self.level_mapping.get(type) logger_method(messag...
def write(self, text: str) -> None: matched = report_re.search(text) if not matched: logger.warning(text.rstrip("\r\n"), type="docutils") else: location, type, level = matched.groups() message = report_re.sub('', text).rstrip() logger.log(type, message, location=location, typ...
# -*- coding: utf-8 -*- """ sphinx.util.docutils ~~~~~~~~~~~~~~~~~~~~ Utility functions for docutils. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import absolute_import import re from copy import copy from contextlib...
# -*- coding: utf-8 -*- """ sphinx.util.docutils ~~~~~~~~~~~~~~~~~~~~ Utility functions for docutils. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import absolute_import import re from copy import copy from contextlib...
"""Utility functions for docutils.""" from __future__ import annotations import os import re from collections.abc import Sequence # NoQA: TCH003 from contextlib import contextmanager from copy import copy from os import path from typing import IO, TYPE_CHECKING, Any, cast import docutils from docutils import nodes ...
"""Utility functions for docutils.""" from __future__ import annotations import os import re from collections.abc import Sequence # NoQA: TCH003 from contextlib import contextmanager from copy import copy from os import path from typing import IO, TYPE_CHECKING, Any, cast import docutils from docutils import nodes ...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 17, 'passed': 17, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 17, 'passed': 16, 'xpassed': 0, 'failed': 1, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/util/docutils.py
./test_repo/tests/test_search.py
13_sphinx_callee__docutils__set_source_info__a6d345f95da246ec7589d34248001df646b5d445
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
a6d345f95da246ec7589d34248001df646b5d445
method
set_source_info
docutils.py
def set_source_info(self, node, lineno=None): # type: (nodes.Node, int) -> None if lineno is None: lineno = self.lineno source_info = self.inliner.reporter.get_source_and_line( lineno) # type: ignore node.source, node.line = source_info
def set_source_info(self, node: Node) -> None: """Set source and line number to the node. .. versionadded:: 2.1 """ node.source, node.line = self.get_source_info()
""" sphinx.util.docutils ~~~~~~~~~~~~~~~~~~~~ Utility functions for docutils. :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import re import types import warnings from contextlib import contextmanager from copy import copy f...
""" sphinx.util.docutils ~~~~~~~~~~~~~~~~~~~~ Utility functions for docutils. :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import re import types import warnings from contextlib import contextmanager from copy import copy f...
"""Utility functions for docutils.""" from __future__ import annotations import os import re from collections.abc import Sequence # NoQA: TCH003 from contextlib import contextmanager from copy import copy from os import path from typing import IO, TYPE_CHECKING, Any, cast import docutils from docutils import nodes ...
"""Utility functions for docutils.""" from __future__ import annotations import os import re from collections.abc import Sequence # NoQA: TCH003 from contextlib import contextmanager from copy import copy from os import path from typing import IO, TYPE_CHECKING, Any, cast import docutils from docutils import nodes ...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 17, 'passed': 17, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 17, 'passed': 4, 'xpassed': 0, 'failed': 13, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/util/docutils.py
./test_repo/tests/test_search.py
13_sphinx_callee__docutils__parse_content_to_nodes__1887df0b5c0dfbefff81b438982b434e34efad3e
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
1887df0b5c0dfbefff81b438982b434e34efad3e
method
parse_content_to_nodes
docutils.py
def parse_content_to_nodes(self) -> list[Node]: """Parse the directive's content into nodes.""" return nested_parse_to_nodes(self.state, self.content, offset=self.content_offset)
def parse_content_to_nodes(self, allow_section_headings: bool = False) -> list[Node]: """Parse the directive's content into nodes. :param allow_section_headings: Are titles (sections) allowed in the directive's content? Note that this option bypasses Docutils' usual checks on doctree st...
"""Utility functions for docutils.""" from __future__ import annotations import os import re from collections.abc import Sequence # NoQA: TCH003 from contextlib import contextmanager from copy import copy from os import path from typing import IO, TYPE_CHECKING, Any, Callable, cast import docutils from docutils imp...
"""Utility functions for docutils.""" from __future__ import annotations import os import re from collections.abc import Sequence # NoQA: TCH003 from contextlib import contextmanager from copy import copy from os import path from typing import IO, TYPE_CHECKING, Any, Callable, cast import docutils from docutils imp...
"""Utility functions for docutils.""" from __future__ import annotations import os import re from collections.abc import Sequence # NoQA: TCH003 from contextlib import contextmanager from copy import copy from os import path from typing import IO, TYPE_CHECKING, Any, cast import docutils from docutils import nodes ...
"""Utility functions for docutils.""" from __future__ import annotations import os import re from collections.abc import Sequence # NoQA: TCH003 from contextlib import contextmanager from copy import copy from os import path from typing import IO, TYPE_CHECKING, Any, cast import docutils from docutils import nodes ...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 17, 'passed': 17, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 17, 'passed': 14, 'xpassed': 0, 'failed': 3, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/util/docutils.py
./test_repo/tests/test_search.py
13_sphinx_callee__highlighting__get_lexer__e0747684b187f9ff4e37fd8894c388f6c250d233
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
e0747684b187f9ff4e37fd8894c388f6c250d233
method
get_lexer
highlighting.py
def get_lexer(self, source, lang, opts=None, location=None): # type: (str, str, Any, Any) -> Lexer # find out which lexer to use if lang in ('py', 'python'): if source.startswith('>>>'): # interactive session lexer = lexers['pycon'] else: lexer = lexers['p...
def get_lexer( self, source: str, lang: str, opts: dict | None = None, force: bool = False, location: Any = None, ) -> Lexer: if not opts: opts = {} # find out which lexer to use if lang in {'py', 'python', 'py3', 'python3', 'default'}: if source.startswith('>>>'): ...
""" sphinx.highlighting ~~~~~~~~~~~~~~~~~~~ Highlight code blocks using Pygments. :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import html import warnings from pygments import highlight from pygments.filters import ErrorToken from p...
""" sphinx.highlighting ~~~~~~~~~~~~~~~~~~~ Highlight code blocks using Pygments. :copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import html import warnings from pygments import highlight from pygments.filters import ErrorToken from p...
"""Highlight code blocks using Pygments.""" from __future__ import annotations from functools import partial from importlib import import_module from typing import TYPE_CHECKING, Any import pygments from pygments import highlight from pygments.filters import ErrorToken from pygments.formatters import HtmlFormatter, ...
"""Highlight code blocks using Pygments.""" from __future__ import annotations from functools import partial from importlib import import_module from typing import TYPE_CHECKING, Any import pygments from pygments import highlight from pygments.filters import ErrorToken from pygments.formatters import HtmlFormatter, ...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 5, 'passed': 5, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 5, 'passed': 0, 'xpassed': 0, 'failed': 5, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/highlighting.py
./test_repo/tests/test_highlighting.py
13_sphinx_callee__highlighting__highlight_block__d60ca8d49d1654968886612883a2affa9dccfaa8
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
d60ca8d49d1654968886612883a2affa9dccfaa8
method
highlight_block
highlighting.py
def highlight_block(source, lang): if not pygments: return '<pre>' + cgi.escape(source) + '</pre>\n' if lang == 'python': if source.startswith('>>>'): lexer = lexers['pycon'] else: lexer = lexers['python'] else: lexer = lexers[lang] try: re...
def highlight_block( self, source: str, lang: str, opts: dict | None = None, force: bool = False, location: Any = None, **kwargs: Any, ) -> str: if not isinstance(source, str): source = source.decode() lexer = self.get_lexer(source, lang, opts, force, location) # highli...
# -*- coding: utf-8 -*- """ sphinx.highlighting ~~~~~~~~~~~~~~~~~~~ Highlight code blocks using Pygments. :copyright: 2007 by Georg Brandl. :license: Python license. """ import cgi from collections import defaultdict try: import pygments from pygments import highlight from pygments.l...
# -*- coding: utf-8 -*- """ sphinx.highlighting ~~~~~~~~~~~~~~~~~~~ Highlight code blocks using Pygments. :copyright: 2007 by Georg Brandl. :license: Python license. """ import cgi from collections import defaultdict try: import pygments from pygments import highlight from pygments.l...
"""Highlight code blocks using Pygments.""" from __future__ import annotations from functools import partial from importlib import import_module from typing import TYPE_CHECKING, Any import pygments from pygments import highlight from pygments.filters import ErrorToken from pygments.formatters import HtmlFormatter, ...
"""Highlight code blocks using Pygments.""" from __future__ import annotations from functools import partial from importlib import import_module from typing import TYPE_CHECKING, Any import pygments from pygments import highlight from pygments.filters import ErrorToken from pygments.formatters import HtmlFormatter, ...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 5, 'passed': 5, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 5, 'passed': 0, 'xpassed': 0, 'failed': 5, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/highlighting.py
./test_repo/tests/test_highlighting.py
13_sphinx_callee__events__emit__fba23bd2bf58a424a037a9d27445635b55efdb3b
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
fba23bd2bf58a424a037a9d27445635b55efdb3b
method
emit
events.py
def emit(self, name, *args): # type: (unicode, Any) -> List results = [] for callback in itervalues(self.listeners[name]): results.append(callback(*args)) return results
def emit( self, name: str, *args: Any, allowed_exceptions: tuple[type[Exception], ...] = (), ) -> list: """Emit a Sphinx event.""" # not every object likes to be repr()'d (think # random stuff coming via autodoc) try: repr_args = repr(args) except Exception: pass ...
# -*- coding: utf-8 -*- """ sphinx.events ~~~~~~~~~~~~~ Sphinx core events. Gracefully adapted from the TextPress system by Armin. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function from collectio...
# -*- coding: utf-8 -*- """ sphinx.events ~~~~~~~~~~~~~ Sphinx core events. Gracefully adapted from the TextPress system by Armin. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function from collectio...
"""Sphinx core events. Gracefully adapted from the TextPress system by Armin. """ from __future__ import annotations from collections import defaultdict from operator import attrgetter from typing import TYPE_CHECKING, NamedTuple, overload from sphinx.errors import ExtensionError, SphinxError from sphinx.locale imp...
"""Sphinx core events. Gracefully adapted from the TextPress system by Armin. """ from __future__ import annotations from collections import defaultdict from operator import attrgetter from typing import TYPE_CHECKING, NamedTuple, overload from sphinx.errors import ExtensionError, SphinxError from sphinx.locale imp...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 3, 'passed': 3, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 3, 'passed': 0, 'xpassed': 0, 'failed': 3, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/events.py
./test_repo/tests/test_events.py
13_sphinx_callee__generate__setup_documenters__5d6413b7120cfc6d3d0cc9367cfe8b6f7ee87523
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
5d6413b7120cfc6d3d0cc9367cfe8b6f7ee87523
function
setup_documenters
generate.py
def setup_documenters(): from sphinx.ext.autodoc import ( ModuleDocumenter, ClassDocumenter, ExceptionDocumenter, DataDocumenter, FunctionDocumenter, MethodDocumenter, AttributeDocumenter, InstanceAttributeDocumenter ) add_documenter(ModuleDocumenter) add_documenter(ClassDocument...
def setup_documenters(app: Any) -> None: from sphinx.ext.autodoc import ( AttributeDocumenter, ClassDocumenter, DataDocumenter, DecoratorDocumenter, ExceptionDocumenter, FunctionDocumenter, MethodDocumenter, ModuleDocumenter, PropertyDocumenter...
# -*- coding: utf-8 -*- """ sphinx.ext.autosummary.generate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the doc...
# -*- coding: utf-8 -*- """ sphinx.ext.autosummary.generate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the doc...
"""Generates reST source files for autosummary. Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the docstring of the referred item. Example Makefile rule:: generate: ...
"""Generates reST source files for autosummary. Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the docstring of the referred item. Example Makefile rule:: generate: ...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 3, 'passed': 3, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 3, 'passed': 0, 'xpassed': 0, 'failed': 3, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/ext/autosummary/generate.py
./test_repo/tests/test_theming/test_templating.py
13_sphinx_callee__generate__generate_autosummary_content__0b06e3317f10f58107829b17fe9b68ed5d49ae7a
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
0b06e3317f10f58107829b17fe9b68ed5d49ae7a
function
generate_autosummary_content
generate.py
def generate_autosummary_content(name, obj, parent, template, template_name, imported_members, app): # type: (str, Any, Any, AutosummaryRenderer, str, bool, Any) -> str doc = get_documenter(app, obj, parent) if template_name is None: template_name = 'autosummary/%s....
def generate_autosummary_content( name: str, obj: Any, parent: Any, template: AutosummaryRenderer, template_name: str, imported_members: bool, app: Any, recursive: bool, context: dict[str, Any], modname: str | None = None, qualname: str | None = None, ) -> str: doc = get_...
""" sphinx.ext.autosummary.generate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the docstring of the referred i...
""" sphinx.ext.autosummary.generate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the docstring of the referred i...
"""Generates reST source files for autosummary. Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the docstring of the referred item. Example Makefile rule:: generate: ...
"""Generates reST source files for autosummary. Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the docstring of the referred item. Example Makefile rule:: generate: ...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 3, 'passed': 3, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 3, 'passed': 0, 'xpassed': 0, 'failed': 3, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/ext/autosummary/generate.py
./test_repo/tests/test_theming/test_templating.py
13_sphinx_callee__generate__generate_autosummary_docs__ce2185ce279664e54ba22b14663091abc5a3a8f2
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
ce2185ce279664e54ba22b14663091abc5a3a8f2
function
generate_autosummary_docs
generate.py
def generate_autosummary_docs(sources, output_dir=None, suffix='.rst', warn=_simple_warn, info=_simple_info, base_path=None, builder=None, template_dir=None): showed_sources = list(sorted(sources)) if len(showed_sources) > 20: showed_sources =...
def generate_autosummary_docs( sources: list[str], output_dir: str | os.PathLike[str] | None = None, suffix: str = '.rst', base_path: str | os.PathLike[str] | None = None, imported_members: bool = False, app: Sphinx | None = None, overwrite: bool = True, encoding: str = 'utf-8', ) -> lis...
# -*- coding: utf-8 -*- """ sphinx.ext.autosummary.generate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the doc...
# -*- coding: utf-8 -*- """ sphinx.ext.autosummary.generate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the doc...
"""Generates reST source files for autosummary. Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the docstring of the referred item. Example Makefile rule:: generate: ...
"""Generates reST source files for autosummary. Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the docstring of the referred item. Example Makefile rule:: generate: ...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 3, 'passed': 3, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 1, 'passed': 0, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 1}
./test_repo/sphinx/ext/autosummary/generate.py
./test_repo/tests/test_theming/test_templating.py
13_sphinx_callee__generate__find_autosummary_in_lines__ce2185ce279664e54ba22b14663091abc5a3a8f2
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
ce2185ce279664e54ba22b14663091abc5a3a8f2
function
find_autosummary_in_lines
generate.py
def find_autosummary_in_lines(lines, module=None, filename=None): """Find out what items appear in autosummary:: directives in the given lines. Returns a list of (name, toctree, template) where *name* is a name of an object and *toctree* the :toctree: path of the corresponding autosummary directive...
def find_autosummary_in_lines( lines: list[str], module: str | None = None, filename: str | None = None, ) -> list[AutosummaryEntry]: """Find out what items appear in autosummary:: directives in the given lines. Returns a list of (name, toctree, template) where *name* is a name of an object...
# -*- coding: utf-8 -*- """ sphinx.ext.autosummary.generate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the doc...
# -*- coding: utf-8 -*- """ sphinx.ext.autosummary.generate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the doc...
"""Generates reST source files for autosummary. Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the docstring of the referred item. Example Makefile rule:: generate: ...
"""Generates reST source files for autosummary. Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the docstring of the referred item. Example Makefile rule:: generate: ...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 3, 'passed': 3, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 3, 'passed': 0, 'xpassed': 0, 'failed': 3, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
./test_repo/sphinx/ext/autosummary/generate.py
./test_repo/tests/test_theming/test_templating.py
13_sphinx_callee__generate__get_parser__6a88b5a6c27718aeaaecb124d7ecfdfd8c08e736
callee
fail-to-pass
https://github.com/sphinx-doc/sphinx
6a88b5a6c27718aeaaecb124d7ecfdfd8c08e736
function
get_parser
generate.py
def get_parser(): # type: () -> argparse.ArgumentParser parser = argparse.ArgumentParser( usage='%(prog)s [OPTIONS] <SOURCE_FILE>...', epilog='For more information, visit <http://sphinx-doc.org/>.', description=""" Generate ReStructuredText using autosummary directives. sphinx-autogen i...
def get_parser() -> argparse.ArgumentParser: parser = argparse.ArgumentParser( usage='%(prog)s [OPTIONS] <SOURCE_FILE>...', epilog=__('For more information, visit <https://www.sphinx-doc.org/>.'), description=__(""" Generate ReStructuredText using autosummary directives. sphinx-autogen is a...
# -*- coding: utf-8 -*- """ sphinx.ext.autosummary.generate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the doc...
# -*- coding: utf-8 -*- """ sphinx.ext.autosummary.generate ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the doc...
"""Generates reST source files for autosummary. Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the docstring of the referred item. Example Makefile rule:: generate: ...
"""Generates reST source files for autosummary. Usable as a library or script to generate automatic RST source files for items referred to in autosummary:: directives. Each generated RST file contains a single auto*:: directive which extracts the docstring of the referred item. Example Makefile rule:: generate: ...
============================= test session starts ============================== platform linux -- Python 3.11.9, pytest-8.3.2, pluggy-1.5.0 -- /workspace/test_venv/bin/python cachedir: .pytest_cache libraries: Sphinx-8.1.0+/04381789d, docutils-0.21.2 base tmp_path: /tmp/pytest-of-root/pytest-0 rootdir: /workspace/test...
{'total': 3, 'passed': 3, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 0}
{'total': 1, 'passed': 0, 'xpassed': 0, 'failed': 0, 'xfailed': 0, 'deselected': 0, 'skipped': 0, 'warning': 0, 'error': 1}
./test_repo/sphinx/ext/autosummary/generate.py
./test_repo/tests/test_theming/test_templating.py