requiresthat 2025.6.21.0__py3-none-any.whl → 2025.6.22.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,10 @@
1
1
  import textwrap
2
2
 
3
- class RequirementNotFulfilledError(Exception):
3
+ class RequirementError(Exception):
4
+ """Base class for all exceptions that follow here"""
5
+ pass
6
+
7
+ class RequirementNotFulfilledError(RequirementError):
4
8
  """Raise this when a requirement is found wanting"""
5
9
 
6
10
  def __init__(self, that, when, subwhen: str = str(), msg=None):
@@ -15,7 +19,7 @@ class RequirementNotFulfilledError(Exception):
15
19
  # Call the base class' constructor to init the exception class
16
20
  super().__init__(msg or self.default_msg)
17
21
 
18
- class NoCallableConstructError(Exception):
22
+ class NoCallableConstructError(RequirementError):
19
23
  """Raise this when a construct is not callable"""
20
24
 
21
25
  def __init__(self, construct, msg=None):
requiresthat/_requires.py CHANGED
@@ -86,7 +86,7 @@ def __assert(self, that, when: When, subwhen: str = str()):
86
86
  try:
87
87
  if not eval(that):
88
88
  raise failure from None
89
- except:
89
+ except Exception:
90
90
  raise failure from None
91
91
  else:
92
92
  # Success!
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: requiresthat
3
- Version: 2025.6.21.0
3
+ Version: 2025.6.22.1
4
4
  Summary: Support for requirements-assisted development
5
5
  Author-email: Ann T Ropea <bedhanger@gmx.de>
6
6
  License-Expression: MIT
@@ -51,4 +51,6 @@ you cannot mandate an invariant this way!
51
51
 
52
52
  ``RequirementNotFulfilledError`` is the exception you have to deal with in case a condition is not
53
53
  met. ``NoCallableConstructError`` gets raised should you apply the decorator to a construct that is
54
- not callable.
54
+ not callable. Both of these derive from the `base class
55
+ <https://gitlab.com/bedhanger/mwe/-/blob/master/python/requiresthat/src/requiresthat/_exceptions.py>`_
56
+ ``RequirementError``.
@@ -0,0 +1,8 @@
1
+ requiresthat/__init__.py,sha256=VTyJru4K2_e7UEa0od6kXU7M8ovfD176GXEXqtNf-nY,154
2
+ requiresthat/_exceptions.py,sha256=4XuneVKh6HAi9r0exCuGwYa2NcTFgnpWbcFj6ggxBIc,1398
3
+ requiresthat/_requires.py,sha256=gpMepQ8iMUkrfiplF3NBJcA26u78F3CzOyUNmRM3TVc,3232
4
+ requiresthat/_when.py,sha256=VoGuvoG9WDEMIPeKnxAsjMTaCMhgSszf4xxa1vLn5aU,299
5
+ requiresthat-2025.6.22.1.dist-info/METADATA,sha256=2Nc8_wje8ZA-qnMohysyK2JdzYCaSQRFVs8YCdEoX00,2240
6
+ requiresthat-2025.6.22.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
+ requiresthat-2025.6.22.1.dist-info/top_level.txt,sha256=mUgMTpAG75GYtt5_rVajUyWp-O_1VrrkqRo_hY9L9So,13
8
+ requiresthat-2025.6.22.1.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- requiresthat/__init__.py,sha256=VTyJru4K2_e7UEa0od6kXU7M8ovfD176GXEXqtNf-nY,154
2
- requiresthat/_exceptions.py,sha256=kzzbS5F-h4Duj84lx6AXWUBHv56VD9jX8og_gJIvN9c,1282
3
- requiresthat/_requires.py,sha256=XmJL6OQBDSNmS7xTRukk0-7vS98pbiTMQ9tEV0zVkOA,3222
4
- requiresthat/_when.py,sha256=VoGuvoG9WDEMIPeKnxAsjMTaCMhgSszf4xxa1vLn5aU,299
5
- requiresthat-2025.6.21.0.dist-info/METADATA,sha256=HGf8uPalVYizcliGDFsadP9U9kfomQOez7NNkfONCdw,2072
6
- requiresthat-2025.6.21.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
7
- requiresthat-2025.6.21.0.dist-info/top_level.txt,sha256=mUgMTpAG75GYtt5_rVajUyWp-O_1VrrkqRo_hY9L9So,13
8
- requiresthat-2025.6.21.0.dist-info/RECORD,,