summaryrefslogtreecommitdiff
path: root/tests/test_domain_js.py
Commit message (Collapse)AuthorAgeFilesLines
* Allow multi-line object description signatures (#11011)TLouf2023-05-111-0/+261
| | | | | Co-authored-by: Adam Turner <9087854+aa-turner@users.noreply.github.com> Co-authored-by: Jean-François B <2589111+jfbu@users.noreply.github.com> Co-authored-by: TLouf <loufthomas@gmail.com>
* Add ``content_offset`` parameter to ``nested_parse_with_titles`` (#11147)Jeremy Maitin-Shepard2023-02-151-0/+13
| | | | | | | | | | | | | | | | | | | | | | | Previously, ``nested_parse_with_titles`` always passed ``0`` as the input offset when invoking ``nested_parse``. When parsing the content of a directive, as is a common use case for ``nested_parse_with_titles``, this leads to incorrect source file/line number information, as it does not take into account the directive's ``content_offset``, which is always non-zero. This issue affects *all* object descriptions due to GH-10887. It also affects the ``sphinx.ext.ifconfig`` extension. The ``py:module`` and ``js:module`` directives employed a workaround for this issue, by wrapping the calls to ``nested_parse_with_title`` with ``switch_source_input``. That worked, but was more complicated (and likely less efficient) than necessary. This commit adds an optional ``content_offset`` parameter to ``nested_parse_with_titles``, and fixes callers to pass the appropriate content offset when needed. This commit eliminates the now-unnecessary calls to ``switch_source_input`` and instead specifies the correct ``content_offset``.
* Adopt ``profile = "black"`` for ``isort``Adam Turner2023-01-071-3/+12
| | | | This allows using Ruff's import sorting fixers
* Collapse single line docstringsAdam Turner2022-02-201-2/+1
|
* Remove copyright and licence fieldsAdam Turner2022-02-201-3/+0
|
* Fix module docstring indentationAdam Turner2022-02-201-2/+2
|
* Fix module docstring first lineAdam Turner2022-02-201-2/+1
|
* Remove module titles in docstringsAdam Turner2022-02-191-3/+0
|
* Migrate to Node.findall() from Node.traverse()Takeshi KOMIYA2022-01-031-2/+2
| | | | | | | | Node.traverse() was marked as deprecated since docutils-0.18. Instead of it, Node.findall() has been added as successor of traverse(). This applies a patch to docutils-0.17 or older to be available Node.findall() and use it.
* A happy new year!Takeshi KOMIYA2022-01-011-1/+1
|
* js/py nodes, update arglist renderingJakob Lykke Andersen2021-10-031-2/+2
|
* js nodes, update name renderingJakob Lykke Andersen2021-10-031-5/+5
|
* js nodes, update display_prefixJakob Lykke Andersen2021-10-031-2/+4
|
* A happy new year!Takeshi KOMIYA2021-01-011-1/+1
| | | | | | | .. note:: $ find sphinx tests LICENSE doc/conf.py -type f -exec sed -i '' -e 's/2007\-20../2007-2021/' {} \; $ git co sphinx/locale/**/*.js sphinx/templates/epub3/mimetype
* Sort imports with isortFrançois Freitag2020-11-111-4/+2
| | | | | | | | | | | | Keep imports alphabetically sorted and their order homogeneous across Python source files. The isort project has more feature and is more active than the flake8-import-order plugin. Most issues caught were simply import ordering from the same module. Where imports were purposefully placed out of order, tag with isort:skip.
* Add tests for noindexentryJakob Lykke Andersen2020-07-051-0/+10
|
* Fix #7301: capital characters are not allowed for node_idTakeshi KOMIYA2020-03-291-8/+8
|
* Fix #7301: Allow . and _ for node_idTakeshi KOMIYA2020-03-221-7/+7
| | | | | | | | | | | | In development of 3.0, Sphinx starts to obey to the rule of "Identifier Normalization" of docutils. This extends it to allow dots(".") and underscores("_") for node identifier. It allows Sphinx to generate node identifier from source string as possible as it is (bacause dots and underscores are usually used in many programming langauges). This change will keep not to break hyperlinks as possible.
* js domain: Generate node_id for objects in the right wayTakeshi KOMIYA2020-03-011-25/+32
|
* test: Add testcase for js domainTakeshi KOMIYA2020-02-151-0/+53
|
* A happy new year!Takeshi KOMIYA2020-01-011-1/+1
|
* Fix #6140: Use unittest.mock instead of mockTakeshi KOMIYA2019-03-081-1/+2
|
* Merge branch '1.8'Takeshi KOMIYA2019-01-021-1/+1
|\
| * A happy new year!Takeshi KOMIYA2019-01-021-1/+1
| |
* | Remove unnecessary encoding cookie from Python source filesJon Dufresne2018-12-161-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In Python 3, the default encoding of source files is utf-8. The encoding cookie is now unnecessary and redundant so remove it. For more details, see the docs: https://docs.python.org/3/howto/unicode.html#the-string-type > The default encoding for Python source code is UTF-8, so you can > simply include a Unicode character in a string literal ... Includes a fix for the flake8 header checks to stop expecting an encoding cookie.
* | refactor: Remove u-prefix from stringsTakeshi KOMIYA2018-12-161-37/+31
|/
* Fix flake8 violationsTakeshi KOMIYA2018-02-191-2/+1
|
* A happy new year!Takeshi KOMIYA2018-01-011-1/+1
|
* refs #3458: add sphinx.testing that are moved from /tests directory.shimizukawa2017-05-141-1/+1
|
* Fix flake8 violationsTakeshi KOMIYA2017-05-091-8/+8
|
* Implement get_full_qualified_name() to JavascriptDomain (refs: #3630)Takeshi KOMIYA2017-04-231-0/+32
|
* Merge pull request #3475 from agjohnson/domain-js-add-nestingTakeshi KOMIYA2017-03-261-31/+79
|\ | | | | Add nesting, package directive, and method directive to JavaScript domain
| * Remove JS domain module feature for null module namesAnthony Johnson2017-03-201-4/+1
| |
| * Add nesting, module directive, and method directive to JavaScript domainAnthony Johnson2017-03-151-31/+82
| | | | | | | | | | | | | | | | | | | | * Adds nesting to the JavaScript domain, to allow for nesting of elements * Adds the ``js:module`` directive, which behaves similarly to the Python directive * Adds the ``js:method`` directive, an alias to ``js:function`` * Adds roles for ``js:mod`` and ``js:meth`` * Updates tests to passing cases * Adds docs for new features
* | Year++Takeshi KOMIYA2017-03-261-1/+1
|/
* Add tests for xrefs on Python and JavaScript domainsAnthony Johnson2017-03-051-0/+87
These are just the passing test cases for the domains currently. I am going to patch up issues with nesting on both domains to start, so these are the test cases I'll be testing against. I'll see about addressing the other core domains, or at very least the cpp domain, with similar tests if this looks okay. So far, these tests only test against methods/functions for the basic nesting structure. More complete tests will test additional domain roles. Refs #662