Skip to content

Commit

Permalink
docs: Add comments defending the use of warning __init__ for backward…
Browse files Browse the repository at this point in the history
…s compatibility
  • Loading branch information
jpmckinney committed May 9, 2024
1 parent 6b99d1a commit 7f9af12
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ocdsextensionregistry/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class OCDSExtensionRegistryWarning(UserWarning):
"""Base class for warnings from within this package"""


# The attributes are used by lib-cove-ocds.
class ExtensionWarning(OCDSExtensionRegistryWarning):
"""Used when an extension file can't be read."""

Expand All @@ -38,6 +39,7 @@ def __str__(self):
return f"{self.extension}: {klass.__module__}.{klass.__name__}: {self.exc}"


# The attributes are used by lib-cove-ocds.
class ExtensionCodelistWarning(OCDSExtensionRegistryWarning):
"""Used when a codelist file can't be read."""

Expand Down

0 comments on commit 7f9af12

Please sign in to comment.