From 07e1ed45ce982c0a52c6da34f58f1f6b45c0e30d Mon Sep 17 00:00:00 2001 From: heitorlessa Date: Sat, 17 Jul 2021 13:14:47 +0200 Subject: [PATCH] feat: use undocumented numpy support in mkdocstrings --- mkdocs.yml | 4 ++++ poetry.lock | 14 +++++++++++++- pyproject.toml | 1 + 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/mkdocs.yml b/mkdocs.yml index 298fae3e50..6c3048f0d4 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -75,6 +75,10 @@ plugins: - git-revision-date - search - mkdocstrings: + handlers: + python: + selection: + docstring_style: numpy watch: - aws_lambda_powertools diff --git a/poetry.lock b/poetry.lock index 5681d544ec..7c29d803b0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -200,6 +200,14 @@ idna = ["idna (>=2.1)"] curio = ["curio (>=1.2)", "sniffio (>=1.1)"] trio = ["trio (>=0.14.0)", "sniffio (>=1.1)"] +[[package]] +name = "docstring-parser" +version = "0.7.3" +description = "" +category = "dev" +optional = false +python-versions = "~=3.5" + [[package]] name = "email-validator" version = "1.1.3" @@ -903,6 +911,7 @@ python-versions = ">=3.6.1,<4.0.0" astunparse = {version = ">=1.6.3,<2.0.0", markers = "python_version < \"3.9\""} cached-property = {version = ">=1.5.2,<2.0.0", markers = "python_version < \"3.8\""} dataclasses = {version = ">=0.7,<0.9", markers = "python_version == \"3.6\""} +docstring_parser = {version = ">=0.7.3,<0.8.0", optional = true, markers = "extra == \"numpy-style\""} typing-extensions = {version = ">=3.7.4.3,<4.0.0.0", markers = "python_version < \"3.8\""} [package.extras] @@ -1131,7 +1140,7 @@ pydantic = ["pydantic", "email-validator"] [metadata] lock-version = "1.1" python-versions = "^3.6.1" -content-hash = "d2e09af1d7a6481f5063548e4207e0791dbd015d12b1519a5c7e1f43ff96affc" +content-hash = "1873bfb09f928c38d678ecee00ab3d945fa758169e7d9629e6ac0cd53863eb57" [metadata.files] appdirs = [ @@ -1251,6 +1260,9 @@ dnspython = [ {file = "dnspython-2.1.0-py3-none-any.whl", hash = "sha256:95d12f6ef0317118d2a1a6fc49aac65ffec7eb8087474158f42f26a639135216"}, {file = "dnspython-2.1.0.zip", hash = "sha256:e4a87f0b573201a0f3727fa18a516b055fd1107e0e5477cded4a2de497df1dd4"}, ] +docstring-parser = [ + {file = "docstring_parser-0.7.3.tar.gz", hash = "sha256:cde5fbf8b846433dfbde1e0f96b7f909336a634d5df34a38cb75050c7346734a"}, +] email-validator = [ {file = "email_validator-1.1.3-py2.py3-none-any.whl", hash = "sha256:5675c8ceb7106a37e40e2698a57c056756bf3f272cfa8682a4f87ebd95d8440b"}, {file = "email_validator-1.1.3.tar.gz", hash = "sha256:aa237a65f6f4da067119b7df3f13e89c25c051327b2b5b66dc075f33d62480d7"}, diff --git a/pyproject.toml b/pyproject.toml index 46a77681b6..0c2719b1b7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -53,6 +53,7 @@ mkdocs-material = "^7.1.9" mkdocs-git-revision-date-plugin = "^0.3.1" mike = "^0.6.0" mkdocstrings = "^0.15.2" +pytkdocs = {extras = ["numpy-style"], version = "^0.11.1"} [tool.poetry.extras]