Expanded type coverage to benchmarks, samples and tests. (#566)

* Renamed json samples to fix duplicate module name.

Signed-off-by: dblock <[email protected]>

* Enabled mypy on all source files.

Signed-off-by: dblock <[email protected]>

* Added missing types.

Signed-off-by: dblock <[email protected]>

* Added CHANGELOG.

Signed-off-by: dblock <[email protected]>

* Move type: ignore to fix untyped decorator makes function untyped.

Signed-off-by: dblock <[email protected]>

* Fix nox -rs lint-3.7.

Signed-off-by: dblock <[email protected]>

* Fixed incorrect import.

Signed-off-by: dblock <[email protected]>

* Fix broken test.

Signed-off-by: dblock <[email protected]>

* Fixed TestBulk::test_bulk_works_with_bytestring_body.

Signed-off-by: dblock <[email protected]>

---------

Signed-off-by: dblock <[email protected]>
This commit is contained in:
Daniel (dB.) Doubrovkine
2023-11-09 10:51:20 -05:00
committed by GitHub
parent dcb79cc322
commit 56c96d7c4f
101 changed files with 1234 additions and 1019 deletions
+18 -16
View File
@@ -26,9 +26,11 @@
# -- Project information -----------------------------------------------------
project = "OpenSearch Python Client"
copyright = "OpenSearch Project Contributors"
author = "OpenSearch Project Contributors"
from typing import Any
project: str = "OpenSearch Python Client"
copyright: str = "OpenSearch Project Contributors"
author: str = "OpenSearch Project Contributors"
# -- General configuration ---------------------------------------------------
@@ -36,7 +38,7 @@ author = "OpenSearch Project Contributors"
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
extensions: Any = [
"sphinx.ext.autodoc",
"sphinx_rtd_theme",
"sphinx.ext.viewcode",
@@ -47,12 +49,12 @@ extensions = [
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
templates_path: Any = ["_templates"]
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []
exclude_patterns: Any = []
# -- Options for HTML output -------------------------------------------------
@@ -60,31 +62,31 @@ exclude_patterns = []
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"
html_theme: str = "sphinx_rtd_theme"
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ["_static"]
html_static_path: Any = ["_static"]
# -- additional settings -------------------------------------------------
intersphinx_mapping = {
intersphinx_mapping: Any = {
"python": ("https://docs.python.org/3", None),
}
html_logo = "imgs/OpenSearch.svg"
html_logo: str = "imgs/OpenSearch.svg"
# These paths are either relative to html_static_path
# or fully qualified paths (eg. https://...)
html_css_files = [
html_css_files: Any = [
"css/custom.css",
]
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
html_show_sphinx = False
html_show_sphinx: bool = False
# add github link
html_context = {
html_context: Any = {
"display_github": True,
"github_user": "opensearch-project",
"github_repo": "opensearch-py",
@@ -94,18 +96,18 @@ html_context = {
# -- autodoc config -------------------------------------------------
# This value controls how to represent typehints.
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_typehints
autodoc_typehints = "description"
autodoc_typehints: str = "description"
# This value selects what content will be inserted into the main body of an autoclass directive.
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autoclass_content
autoclass_content = "both"
autoclass_content: str = "both"
# https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-add_module_names
# add_module_names = False
# The default options for autodoc directives.
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#confval-autodoc_default_options
autodoc_default_options = {
autodoc_default_options: Any = {
# If set, autodoc will generate document for the members of the target module, class or exception. # noqa: E501
# https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html#directive-option-automodule-members
"members": True,