-
Notifications
You must be signed in to change notification settings - Fork 406
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(idempotency): POWERTOOLS_IDEMPOTENCY_DISABLED should respect trut…
…hy values (#4391) Co-authored-by: Leandro Damascena <[email protected]>
- Loading branch information
1 parent
b04d648
commit 751bf99
Showing
3 changed files
with
111 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
"""Shared warnings that don't belong to a single utility""" | ||
|
||
|
||
class PowertoolsUserWarning(UserWarning): | ||
""" | ||
This class provides a custom Warning tailored for better clarity when certain situations occur. | ||
Examples: | ||
- Using development-only features in production environment. | ||
- Potential performance or security issues due to misconfiguration. | ||
Parameters | ||
---------- | ||
message: str | ||
The warning message to be displayed. | ||
""" | ||
|
||
def __init__(self, message): | ||
self.message = message | ||
super().__init__(message) | ||
|
||
def __str__(self): | ||
return self.message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters