Strongtyping

Latest version: v3.12.1

Safety actively analyzes 682334 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 9

3.12.1

What's Changed
* feat: raise `UndefinedKey` exception on user decision by FelixTheC in https://github.com/FelixTheC/strongtyping/pull/130
- new exception type `UndefinedKey`
- new allowed parameter(`throw_on_undefined`) for `match_class_typing` which will be thrown if you try to init a TypeDict with an unspecified attribute/key


- test case example:

python
def test_new_parameter():
match_class_typing(throw_on_undefined=True)
class User(TypedDict):
id: str
username: str
description: str | None

with pytest.raises(UndefinedKey):
User({"id": "0123", "username": "test", "description": None, "age": 10})


**Full Changelog**: https://github.com/FelixTheC/strongtyping/compare/v3.12.0...v3.12.1

3.11.4

What's Changed
* Bump certifi from 2020.12.5 to 2022.12.7 in /docs by dependabot in https://github.com/FelixTheC/strongtyping/pull/107
* Remove print() from Exceptions by JakobDev in https://github.com/FelixTheC/strongtyping/pull/112

New Contributors
* JakobDev made their first contribution in https://github.com/FelixTheC/strongtyping/pull/112

**Full Changelog**: https://github.com/FelixTheC/strongtyping/compare/v2.2.3...v3.11.4

3.11.3

- include `strongtyping-stubs` into package data

3.11.1

**Full Changelog**: https://github.com/FelixTheC/strongtyping/compare/v3.10.7...v3.11.1

3.10.108082022

What's Changed
Add: allow duck_typing

- with `allow_duck_typing = True` I will use the mypy behavior for int and float as described here https://mypy.readthedocs.io/en/stable/duck_type_compatibility.html for others I will search if they have the same superclass besides `object` and `type`
- without `allow_duck_typing` or `allow_duck_typing=False` I will have an exact match of the types

python
from strongtyping.strong_typing import match_typing


match_typing(allow_duck_typing=True)
def adder(x: int, y: float):
return x + y


passes

3.10.7

What's Changed
* close: 115 infinite recursion when dataclass decorator comes after match class typing by FelixTheC in https://github.com/FelixTheC/strongtyping/pull/116


**Full Changelog**: https://github.com/FelixTheC/strongtyping/compare/v3.10.6...v3.10.7

Page 1 of 9

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.