From f871ef33a4dedd365b7dc0ddd968628fa2716f82 Mon Sep 17 00:00:00 2001 From: Wessel Bruinsma Date: Wed, 20 Sep 2023 00:35:25 +0200 Subject: [PATCH 1/2] Minor simplification --- tests/test_parametric.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_parametric.py b/tests/test_parametric.py index 00bbcfa0..535819da 100644 --- a/tests/test_parametric.py +++ b/tests/test_parametric.py @@ -510,7 +510,9 @@ class MockVal: def test_init_subclass_correct_args(): - # See issue https://github.com/beartype/plum/issues/105 + # See the following issue: + # + # https://github.com/beartype/plum/issues/105 from plum import parametric @@ -518,10 +520,8 @@ def test_init_subclass_correct_args(): class Pytree: def __init_subclass__(cls, **kwargs): - if cls in register: - raise ValueError("duplicate") - else: - register.add(cls) + assert cls not in register, "Duplicate!" + register.add(cls) @parametric class Wrapper(Pytree): From 4008f409fee356a95a3dbde04888ac7be9c16cf4 Mon Sep 17 00:00:00 2001 From: Wessel Bruinsma Date: Sat, 23 Sep 2023 10:01:23 +0200 Subject: [PATCH 2/2] Update `beartype` to fix `classmethods` bug --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index addea61e..c6728a0a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ dynamic = ["version"] requires-python = ">=3.8" dependencies = [ - "beartype >= 0.16", + "beartype>=0.16.2", "typing-extensions; python_version<='3.10'", ]