Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

named

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

named - npm Package Compare versions

Comparing version
1.0.1
to
1.1.0
+2
-2
named/__init__.py
"""Named types.
This library defines the [`Named`][named.typing.Named] protocol for types
that possess the `__name__` attribute, abstracting the attribute itself away.
that contain the `__name__` attribute, abstracting the attribute itself away.

@@ -26,3 +26,3 @@ It also provides the [`get_name`][named.typing.get_name] function to fetch

__license__ = "MIT"
__version__ = "1.0.1"
__version__ = "1.1.0"

@@ -29,0 +29,0 @@ from named.typing import NAME, Named, get_name, get_type_name, is_named

@@ -15,3 +15,3 @@ from builtins import hasattr as has_attribute

class Named(Protocol):
"""The named protocol for types that possess the `__name__` attribute."""
"""The named protocol for types that contain the `__name__` attribute."""
__name__: str

@@ -18,0 +18,0 @@

+12
-10
Metadata-Version: 2.1
Name: named
Version: 1.0.1
Version: 1.1.0
Summary: Named types.
Home-page: https://github.com/nekitdev/named
License: MIT
Keywords: python,named
Keywords: python,named,name
Author: nekitdev

@@ -76,3 +76,3 @@ Requires-Python: >=3.7

[tool.poetry.dependencies]
named = "^1.0.1"
named = "^1.1.0"
```

@@ -90,9 +90,11 @@

```python
from named import get_name, get_type_name, is_named
print(is_named(int)) # True
print(get_name(int)) # int
print(is_named(42)) # False
print(get_type_name(42)) # int
>>> from named import get_name, get_type_name, is_named
>>> print(is_named(int))
True
>>> print(get_name(int))
int
>>> print(is_named(42))
False
>>> print(get_type_name(42))
int
```

@@ -99,0 +101,0 @@

[tool.poetry]
name = "named"
version = "1.0.1"
version = "1.1.0"
description = "Named types."

@@ -14,3 +14,3 @@ authors = ["nekitdev"]

keywords = ["python", "named"]
keywords = ["python", "named", "name"]

@@ -51,3 +51,3 @@ classifiers = [

[tool.poetry.group.check.dependencies]
mypy = "0.981"
mypy = "0.982"

@@ -72,2 +72,5 @@ [tool.poetry.group.test]

[tool.poetry.group.dev.dependencies]
changelogging = "1.0.0"
[tool.black]

@@ -128,5 +131,5 @@ line_length = 100

[tool.changelog]
[tool.changelogging]
name = "named"
version = "1.0.1"
version = "1.1.0"
url = "https://github.com/nekitdev/named"

@@ -136,3 +139,3 @@ directory = "changes"

start_string = "<!-- changelog: start -->"
start_string = "<!-- changelogging: start -->"

@@ -139,0 +142,0 @@ title_format = "{version} ({date})"

@@ -47,3 +47,3 @@ # `named`

[tool.poetry.dependencies]
named = "^1.0.1"
named = "^1.1.0"
```

@@ -61,9 +61,11 @@

```python
from named import get_name, get_type_name, is_named
print(is_named(int)) # True
print(get_name(int)) # int
print(is_named(42)) # False
print(get_type_name(42)) # int
>>> from named import get_name, get_type_name, is_named
>>> print(is_named(int))
True
>>> print(get_name(int))
int
>>> print(is_named(42))
False
>>> print(get_type_name(42))
int
```

@@ -70,0 +72,0 @@

@@ -15,5 +15,5 @@ # -*- coding: utf-8 -*-

'name': 'named',
'version': '1.0.1',
'version': '1.1.0',
'description': 'Named types.',
'long_description': '# `named`\n\n[![License][License Badge]][License]\n[![Version][Version Badge]][Package]\n[![Downloads][Downloads Badge]][Package]\n[![Discord][Discord Badge]][Discord]\n\n[![Documentation][Documentation Badge]][Documentation]\n[![Check][Check Badge]][Actions]\n[![Test][Test Badge]][Actions]\n[![Coverage][Coverage Badge]][Coverage]\n\n> *Named types.*\n\n## Installing\n\n**Python 3.7 or above is required.**\n\n### pip\n\nInstalling the library with `pip` is quite simple:\n\n```console\n$ pip install named\n```\n\nAlternatively, the library can be installed from source:\n\n```console\n$ git clone https://github.com/nekitdev/named.git\n$ cd named\n$ python -m pip install .\n```\n\n### poetry\n\nYou can add `named` as a dependency with the following command:\n\n```console\n$ poetry add named\n```\n\nOr by directly specifying it in the configuration like so:\n\n```toml\n[tool.poetry.dependencies]\nnamed = "^1.0.1"\n```\n\nAlternatively, you can add it directly from the source:\n\n```toml\n[tool.poetry.dependencies.named]\ngit = "https://github.com/nekitdev/named.git"\n```\n\n## Example\n\n```python\nfrom named import get_name, get_type_name, is_named\n\nprint(is_named(int)) # True\nprint(get_name(int)) # int\n\nprint(is_named(42)) # False\nprint(get_type_name(42)) # int\n```\n\n## Documentation\n\nYou can find the documentation [here][Documentation].\n\n## Support\n\nIf you need support with the library, you can send an [email][Email]\nor refer to the official [Discord server][Discord].\n\n## Changelog\n\nYou can find the changelog [here][Changelog].\n\n## Security Policy\n\nYou can find the Security Policy of `named` [here][Security].\n\n## Contributing\n\nIf you are interested in contributing to `named`, make sure to take a look at the\n[Contributing Guide][Contributing Guide], as well as the [Code of Conduct][Code of Conduct].\n\n## License\n\n`named` is licensed under the MIT License terms. See [License][License] for details.\n\n[Email]: mailto:support@nekit.dev\n\n[Discord]: https://nekit.dev/discord\n\n[Actions]: https://github.com/nekitdev/named/actions\n\n[Changelog]: https://github.com/nekitdev/named/blob/main/CHANGELOG.md\n[Code of Conduct]: https://github.com/nekitdev/named/blob/main/CODE_OF_CONDUCT.md\n[Contributing Guide]: https://github.com/nekitdev/named/blob/main/CONTRIBUTING.md\n[Security]: https://github.com/nekitdev/named/blob/main/SECURITY.md\n\n[License]: https://github.com/nekitdev/named/blob/main/LICENSE\n\n[Package]: https://pypi.org/project/named\n[Coverage]: https://codecov.io/gh/nekitdev/named\n[Documentation]: https://nekitdev.github.io/named\n\n[Discord Badge]: https://img.shields.io/badge/chat-discord-5865f2\n[License Badge]: https://img.shields.io/pypi/l/named\n[Version Badge]: https://img.shields.io/pypi/v/named\n[Downloads Badge]: https://img.shields.io/pypi/dm/named\n\n[Documentation Badge]: https://github.com/nekitdev/named/workflows/docs/badge.svg\n[Check Badge]: https://github.com/nekitdev/named/workflows/check/badge.svg\n[Test Badge]: https://github.com/nekitdev/named/workflows/test/badge.svg\n[Coverage Badge]: https://codecov.io/gh/nekitdev/named/branch/main/graph/badge.svg\n',
'long_description': '# `named`\n\n[![License][License Badge]][License]\n[![Version][Version Badge]][Package]\n[![Downloads][Downloads Badge]][Package]\n[![Discord][Discord Badge]][Discord]\n\n[![Documentation][Documentation Badge]][Documentation]\n[![Check][Check Badge]][Actions]\n[![Test][Test Badge]][Actions]\n[![Coverage][Coverage Badge]][Coverage]\n\n> *Named types.*\n\n## Installing\n\n**Python 3.7 or above is required.**\n\n### pip\n\nInstalling the library with `pip` is quite simple:\n\n```console\n$ pip install named\n```\n\nAlternatively, the library can be installed from source:\n\n```console\n$ git clone https://github.com/nekitdev/named.git\n$ cd named\n$ python -m pip install .\n```\n\n### poetry\n\nYou can add `named` as a dependency with the following command:\n\n```console\n$ poetry add named\n```\n\nOr by directly specifying it in the configuration like so:\n\n```toml\n[tool.poetry.dependencies]\nnamed = "^1.1.0"\n```\n\nAlternatively, you can add it directly from the source:\n\n```toml\n[tool.poetry.dependencies.named]\ngit = "https://github.com/nekitdev/named.git"\n```\n\n## Example\n\n```python\n>>> from named import get_name, get_type_name, is_named\n>>> print(is_named(int))\nTrue\n>>> print(get_name(int))\nint\n>>> print(is_named(42))\nFalse\n>>> print(get_type_name(42))\nint\n```\n\n## Documentation\n\nYou can find the documentation [here][Documentation].\n\n## Support\n\nIf you need support with the library, you can send an [email][Email]\nor refer to the official [Discord server][Discord].\n\n## Changelog\n\nYou can find the changelog [here][Changelog].\n\n## Security Policy\n\nYou can find the Security Policy of `named` [here][Security].\n\n## Contributing\n\nIf you are interested in contributing to `named`, make sure to take a look at the\n[Contributing Guide][Contributing Guide], as well as the [Code of Conduct][Code of Conduct].\n\n## License\n\n`named` is licensed under the MIT License terms. See [License][License] for details.\n\n[Email]: mailto:support@nekit.dev\n\n[Discord]: https://nekit.dev/discord\n\n[Actions]: https://github.com/nekitdev/named/actions\n\n[Changelog]: https://github.com/nekitdev/named/blob/main/CHANGELOG.md\n[Code of Conduct]: https://github.com/nekitdev/named/blob/main/CODE_OF_CONDUCT.md\n[Contributing Guide]: https://github.com/nekitdev/named/blob/main/CONTRIBUTING.md\n[Security]: https://github.com/nekitdev/named/blob/main/SECURITY.md\n\n[License]: https://github.com/nekitdev/named/blob/main/LICENSE\n\n[Package]: https://pypi.org/project/named\n[Coverage]: https://codecov.io/gh/nekitdev/named\n[Documentation]: https://nekitdev.github.io/named\n\n[Discord Badge]: https://img.shields.io/badge/chat-discord-5865f2\n[License Badge]: https://img.shields.io/pypi/l/named\n[Version Badge]: https://img.shields.io/pypi/v/named\n[Downloads Badge]: https://img.shields.io/pypi/dm/named\n\n[Documentation Badge]: https://github.com/nekitdev/named/workflows/docs/badge.svg\n[Check Badge]: https://github.com/nekitdev/named/workflows/check/badge.svg\n[Test Badge]: https://github.com/nekitdev/named/workflows/test/badge.svg\n[Coverage Badge]: https://codecov.io/gh/nekitdev/named/branch/main/graph/badge.svg\n',
'author': 'nekitdev',

@@ -20,0 +20,0 @@ 'author_email': 'None',