New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

docdata

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docdata - pypi Package Compare versions

Comparing version
0.0.4
to
0.0.5.dev0
+3
-2
PKG-INFO

@@ -1,4 +0,4 @@

Metadata-Version: 2.1
Metadata-Version: 2.4
Name: docdata
Version: 0.0.4
Version: 0.0.5.dev0
Summary: Add structured information to the end of your python docstrings.

@@ -59,2 +59,3 @@ Author-email: Charles Tapley Hoyt <cthoyt@gmail.com>

Requires-Dist: sphinx_automodapi; extra == "docs"
Dynamic: license-file

@@ -61,0 +62,0 @@ <!--

+1
-3

@@ -8,3 +8,3 @@ # See https://setuptools.readthedocs.io/en/latest/build_meta.html

name = "docdata"
version = "0.0.4"
version = "0.0.5-dev"
description = "Add structured information to the end of your python docstrings."

@@ -36,3 +36,2 @@ readme = "README.md"

"Programming Language :: Python :: 3 :: Only",
# TODO add your topics from the Trove controlled vocabulary (see https://pypi.org/classifiers)
]

@@ -42,3 +41,2 @@ keywords = [

"cookiecutter",
# TODO add your own free-text keywords
]

@@ -45,0 +43,0 @@

@@ -1,4 +0,4 @@

Metadata-Version: 2.1
Metadata-Version: 2.4
Name: docdata
Version: 0.0.4
Version: 0.0.5.dev0
Summary: Add structured information to the end of your python docstrings.

@@ -59,2 +59,3 @@ Author-email: Charles Tapley Hoyt <cthoyt@gmail.com>

Requires-Dist: sphinx_automodapi; extra == "docs"
Dynamic: license-file

@@ -61,0 +62,0 @@ <!--

@@ -27,5 +27,5 @@ """Utilities for documentation."""

def parse_docdata(
obj: None,
obj: None = None,
*,
delimiter: str,
delimiter: str = ...,
formatter: Optional[Callable[[Any], str]] = None,

@@ -40,3 +40,3 @@ ) -> Callable[[X], X]: ...

*,
delimiter: str,
delimiter: str = ...,
formatter: Optional[Callable[[Any], str]] = None,

@@ -43,0 +43,0 @@ ) -> X: ...

@@ -11,7 +11,7 @@ """Version information for :mod:`docdata`.

"VERSION",
"get_git_hash",
"get_version",
"get_git_hash",
]
VERSION = "0.0.4"
VERSION = "0.0.5-dev"

@@ -34,3 +34,3 @@

def get_version(with_git_hash: bool = False):
def get_version(with_git_hash: bool = False) -> str:
"""Get the :mod:`docdata` version string, including a git hash."""

@@ -37,0 +37,0 @@ return f"{VERSION}-{get_git_hash()}" if with_git_hash else VERSION

"""Test the docdata parser."""
import unittest
from typing import Any

@@ -12,3 +13,3 @@ from docdata import get_docdata, parse_docdata

def test_strip_trailing_lines(self):
def test_strip_trailing_lines(self) -> None:
"""Test stripping trailing lines."""

@@ -38,3 +39,3 @@ for expected, actual in [

def __init__(self, *args):
def __init__(self, *args: Any) -> None:
"""Initialize the class with dummy args."""

@@ -56,3 +57,3 @@ self.args = args

def __init__(self, *args):
def __init__(self, *args: Any) -> None:
"""Initialize the class with dummy args."""

@@ -72,3 +73,3 @@ self.args = args

def __init__(self, *args):
def __init__(self, *args: Any) -> None:
"""Initialize the class with dummy args."""

@@ -87,3 +88,3 @@ self.args = args

def __init__(self, *args):
def __init__(self, *args: Any) -> None:
"""Initialize the class with dummy args."""

@@ -96,3 +97,3 @@ self.args = args

def _help(self, a, b):
def _help(self, a: Any, b: Any) -> None:
self.assertEqual(a.__doc__.rstrip(), b.__doc__.rstrip())

@@ -102,3 +103,3 @@ self.assertIsNone(get_docdata(b))

def test_parse_no_params_no_newline(self):
def test_parse_no_params_no_newline(self) -> None:
"""Test parsing docdata with no params, and no trailing space.."""

@@ -115,3 +116,3 @@

def test_parse_no_params_one_newline(self):
def test_parse_no_params_one_newline(self) -> None:
"""Test parsing docdata with no params, and a newline before the delimiter."""

@@ -129,3 +130,3 @@

def test_parse_no_params_one_newline_functional(self):
def test_parse_no_params_one_newline_functional(self) -> None:
"""Test parsing docdata with no params, and a newline before the delimiter."""

@@ -143,3 +144,3 @@

def test_parse_no_params_one_newline_alt_delimiter(self):
def test_parse_no_params_one_newline_alt_delimiter(self) -> None:
"""Test parsing docdata with no params, and a newline before the delimiter."""

@@ -157,3 +158,3 @@

def test_parse_no_params_many_newline(self):
def test_parse_no_params_many_newline(self) -> None:
"""Test parsing docdata with no params, and a newline before the delimiter."""

@@ -173,20 +174,20 @@

def test_parse_with_params_no_newline(self):
def test_parse_with_params_no_newline(self) -> None:
"""Test parsing docdata."""
self._help(C1, D)
def test_parse_with_params_one_newline(self):
def test_parse_with_params_one_newline(self) -> None:
"""Test parsing docdata."""
self._help(C2, D)
def test_parse_with_params_many_newline(self):
def test_parse_with_params_many_newline(self) -> None:
"""Test parsing docdata."""
self._help(C3, D)
def test_formatter(self):
def test_formatter(self) -> None:
"""Test the formatter."""
def formatter(data):
def formatter(data: dict[str, Any]) -> str:
"""Format the data."""
return f'\n\n{data["name"]} is rated {data["rating"]}'
return f"\n\n{data['name']} is rated {data['rating']}"

@@ -193,0 +194,0 @@ @parse_docdata(delimiter="****", formatter=formatter)

@@ -11,3 +11,3 @@ """Trivial version test."""

def test_version_type(self):
def test_version_type(self) -> None:
"""Test the version is a string.

@@ -14,0 +14,0 @@