Skip to content

Commit

Permalink
Minor fixes (typos, http->https in links, types) (#348)
Browse files Browse the repository at this point in the history
* Avoid http->https redirect, use https where possible

* Add autoapi_template_dir to existing array instead of re-declaring

* Typos

* Sphinx util uses int for verbosity in status_iterator

* Sphinx utils uses tuples for TypeField arguments
  • Loading branch information
kinow authored Sep 27, 2022
1 parent 991ac22 commit c9edd8d
Show file tree
Hide file tree
Showing 12 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,15 @@ Features
* `#275 </~https://github.com/readthedocs/sphinx-autoapi/issues/275>`:
Warnings have been categorised and can be suppressed through ``suppress_warnings``.
* `#280 </~https://github.com/readthedocs/sphinx-autoapi/issues/280>`:
Data attributes are documentated in module summaries.
Data attributes are documented in module summaries.

Bug Fixes
^^^^^^^^^

* `#273 </~https://github.com/readthedocs/sphinx-autoapi/issues/273>`:
Fixed setting ``autodoc_typehints`` to ``none`` or ``description``
not turning off signature type hints.
``autodoc_typehints`` integration is consisidered experimental until
``autodoc_typehints`` integration is considered experimental until
the extension properly supports overload functions.
* `#261 </~https://github.com/readthedocs/sphinx-autoapi/issues/261>`:
Fixed data annotations causing pickle or deepcopy errors.
Expand Down Expand Up @@ -235,7 +235,7 @@ Features
for accessing version information.
* `#201 </~https://github.com/readthedocs/sphinx-autoapi/issues/201>`: (Python)
Added the ``autoapi_member_order`` option to allow the order that members
are documentated to be configurable.
are documented to be configurable.
* `#203 </~https://github.com/readthedocs/sphinx-autoapi/issues/203>`: (Python)
A class without a docstring inherits one from its parent.
A methods without a docstring inherits one from the method that it overrides.
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Language Status Parser
========== ====== ==========================================================
Python Stable Custom using `astroid </~https://github.com/PyCQA/astroid>`_
Go Alpha `godocjson </~https://github.com/readthedocs/godocjson>`_
Javascript Alpha `jsdoc <http://usejsdoc.org/>`_
Javascript Alpha `jsdoc <https://jsdoc.app/>`_
.NET Alpha `docfx <https://dotnet.github.io/docfx/>`_
========== ====== ==========================================================

Expand Down Expand Up @@ -126,7 +126,7 @@ You can even get black to format changes automatically when you commit using `pr
Versioning
----------

We use `SemVer <http://semver.org/>`_ for versioning. For the versions available, see the `tags on this repository </~https://github.com/readthedocs/sphinx-autoapi/tags>`_.
We use `SemVer <https://semver.org/>`_ for versioning. For the versions available, see the `tags on this repository </~https://github.com/readthedocs/sphinx-autoapi/tags>`_.

License
-------
Expand Down
2 changes: 1 addition & 1 deletion autoapi/mappers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def output_rst(self, root, source_suffix):
self.objects.items(),
bold("[AutoAPI] ") + "Rendering Data... ",
length=len(self.objects),
verbosity="INFO",
verbosity=1,
stringify_func=(lambda x: x[0]),
):
rst = obj.render()
Expand Down
2 changes: 1 addition & 1 deletion autoapi/mappers/dotnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ def ref_name(self):
As the `<T>` notation is also special syntax in references, indicating
the reference to Foo.Bar should be named T.
See: http://sphinx-doc.org/domains.html#role-cpp:any
See: https://www.sphinx-doc.org/en/master/#role-cpp:any
"""
return self.name.replace("<", r"\<").replace("`", r"\`")

Expand Down
2 changes: 1 addition & 1 deletion autoapi/templates/javascript/function.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{# Identention in this file is important #}
{# Indentation in this file is important #}

{% if is_method %}
{# Slice self off #}
Expand Down
2 changes: 1 addition & 1 deletion autoapi/templates/javascript/member.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{# Identention in this file is important #}
{# Indentation in this file is important #}

.. js:{{ obj.type }}:: {{ obj.name }}

Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,6 @@ def setup(app):
objname='configuration value',
indextemplate='pair: %s; configuration value')
fdesc = TypedField('parameter', label='Parameters',
names=['param'], typenames=['type'], can_collapse=True)
names=('param',), typenames=('type',), can_collapse=True)
app.add_object_type('event', 'event', 'pair: %s; event', parse_event,
doc_field_types=[fdesc])
4 changes: 2 additions & 2 deletions docs/maintenance/design.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ and Sphinx will create output from that markup.
Spam the foo.
The author of the doucmentation will have now told Sphinx that the *spam* function exists in the Python project that is being documented.
The author of the documentation will have now told Sphinx that the *spam* function exists in the Python project that is being documented.

Autogenerated Output
~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -130,7 +130,7 @@ but we need to have a place to define the page structure in the HTML.

This can be done before or after the loading of the content into RST.
We decided to do it before loading into RST because that matches standard Sphinx convention.
Generally the markup being fed in as RST is considered to be in a file that maps to it's output loation.
Generally the markup being fed in as RST is considered to be in a file that maps to it's output location.
If we tried to manipulate this structure after loading into the Domain,
that could lead to unexpected consequences like wrong indexes and missing references.

Expand Down
2 changes: 1 addition & 1 deletion tests/dotnetexample/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BUILDDIR = _build

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from https://www.sphinx-doc.org/)
endif

# Internal variables.
Expand Down
2 changes: 1 addition & 1 deletion tests/dotnetexample/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
This assumes that you have a ``docfx`` executable on your `PATH`.
It also depends on the sphinxcontrib-dotnet domain: /~https://github.com/readthedocs/sphinxcontrib-dotnetdomain

Currently this is setup to build the Identity repo from ASP.Net
Currently, this is set up to build the Identity repo from ASP.Net

You should simply be able to run ``make html`` in this directory.
2 changes: 1 addition & 1 deletion tests/templateexample/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
autoapi_file_pattern = "*.py"
autoapi_template_dir = "template_overrides"

exclude_patterns = [autoapi_template_dir]
exclude_patterns += [autoapi_template_dir]
2 changes: 1 addition & 1 deletion tests/test_integration.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def test_toctree_domain_insertion(self):

class TestExtensionErrors:
@pytest.fixture(autouse=True)
def unload_go_and_dotned_libraries(self):
def unload_go_and_dotnet_libraries(self):
# unload dotnet and golang domain libraries, because they may be imported before
for mod_name in ("sphinxcontrib.dotnetdomain", "sphinxcontrib.golangdomain"):
try:
Expand Down

0 comments on commit c9edd8d

Please sign in to comment.