From c9edd8d1c666535c6c914e118cf0f21acdddfb2e Mon Sep 17 00:00:00 2001 From: "Bruno P. Kinoshita" Date: Wed, 28 Sep 2022 08:18:48 +1300 Subject: [PATCH] Minor fixes (typos, http->https in links, types) (#348) * 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 --- CHANGELOG.rst | 6 +++--- README.rst | 4 ++-- autoapi/mappers/base.py | 2 +- autoapi/mappers/dotnet.py | 2 +- autoapi/templates/javascript/function.rst | 2 +- autoapi/templates/javascript/member.rst | 2 +- docs/conf.py | 2 +- docs/maintenance/design.rst | 4 ++-- tests/dotnetexample/Makefile | 2 +- tests/dotnetexample/README.md | 2 +- tests/templateexample/conf.py | 2 +- tests/test_integration.py | 2 +- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 03dd0d9e..3d6a5461 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -100,7 +100,7 @@ Features * `#275 `: Warnings have been categorised and can be suppressed through ``suppress_warnings``. * `#280 `: - Data attributes are documentated in module summaries. + Data attributes are documented in module summaries. Bug Fixes ^^^^^^^^^ @@ -108,7 +108,7 @@ Bug Fixes * `#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 `: Fixed data annotations causing pickle or deepcopy errors. @@ -235,7 +235,7 @@ Features for accessing version information. * `#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 `: (Python) A class without a docstring inherits one from its parent. A methods without a docstring inherits one from the method that it overrides. diff --git a/README.rst b/README.rst index e6180941..efc122a6 100644 --- a/README.rst +++ b/README.rst @@ -36,7 +36,7 @@ Language Status Parser ========== ====== ========================================================== Python Stable Custom using `astroid `_ Go Alpha `godocjson `_ -Javascript Alpha `jsdoc `_ +Javascript Alpha `jsdoc `_ .NET Alpha `docfx `_ ========== ====== ========================================================== @@ -126,7 +126,7 @@ You can even get black to format changes automatically when you commit using `pr Versioning ---------- -We use `SemVer `_ for versioning. For the versions available, see the `tags on this repository `_. +We use `SemVer `_ for versioning. For the versions available, see the `tags on this repository `_. License ------- diff --git a/autoapi/mappers/base.py b/autoapi/mappers/base.py index c0d22700..3f7eb329 100644 --- a/autoapi/mappers/base.py +++ b/autoapi/mappers/base.py @@ -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() diff --git a/autoapi/mappers/dotnet.py b/autoapi/mappers/dotnet.py index d530fa0e..cd2b868d 100644 --- a/autoapi/mappers/dotnet.py +++ b/autoapi/mappers/dotnet.py @@ -429,7 +429,7 @@ def ref_name(self): As the `` 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"\`") diff --git a/autoapi/templates/javascript/function.rst b/autoapi/templates/javascript/function.rst index b46bea79..05179ab3 100644 --- a/autoapi/templates/javascript/function.rst +++ b/autoapi/templates/javascript/function.rst @@ -1,4 +1,4 @@ -{# Identention in this file is important #} +{# Indentation in this file is important #} {% if is_method %} {# Slice self off #} diff --git a/autoapi/templates/javascript/member.rst b/autoapi/templates/javascript/member.rst index 289febae..d0eecc52 100644 --- a/autoapi/templates/javascript/member.rst +++ b/autoapi/templates/javascript/member.rst @@ -1,4 +1,4 @@ -{# Identention in this file is important #} +{# Indentation in this file is important #} .. js:{{ obj.type }}:: {{ obj.name }} diff --git a/docs/conf.py b/docs/conf.py index ddd11125..3e467233 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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]) diff --git a/docs/maintenance/design.rst b/docs/maintenance/design.rst index 597620ad..f41aeeb0 100644 --- a/docs/maintenance/design.rst +++ b/docs/maintenance/design.rst @@ -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 ~~~~~~~~~~~~~~~~~~~~ @@ -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. diff --git a/tests/dotnetexample/Makefile b/tests/dotnetexample/Makefile index f2dfd3da..1937cb95 100644 --- a/tests/dotnetexample/Makefile +++ b/tests/dotnetexample/Makefile @@ -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. diff --git a/tests/dotnetexample/README.md b/tests/dotnetexample/README.md index 20201a05..955bc036 100644 --- a/tests/dotnetexample/README.md +++ b/tests/dotnetexample/README.md @@ -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. diff --git a/tests/templateexample/conf.py b/tests/templateexample/conf.py index 6686d1a2..ff2fec5b 100644 --- a/tests/templateexample/conf.py +++ b/tests/templateexample/conf.py @@ -21,4 +21,4 @@ autoapi_file_pattern = "*.py" autoapi_template_dir = "template_overrides" -exclude_patterns = [autoapi_template_dir] +exclude_patterns += [autoapi_template_dir] diff --git a/tests/test_integration.py b/tests/test_integration.py index 731f9f7e..1f0284d6 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -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: