-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "monkey patch pydantic_core.Url for str concatentation"
This reverts commit 6bd788b.
- Loading branch information
1 parent
6bd788b
commit f9fc223
Showing
5 changed files
with
4 additions
and
25 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +0,0 @@ | ||
from pydantic_core import Url | ||
|
||
|
||
def __add__(self, other): | ||
return str(self) + other | ||
|
||
|
||
def __radd__(self, other): | ||
return other + str(self) | ||
|
||
|
||
# monkey patch string concatentation until pydantic implements Url as an extension of str again | ||
# https://github.com/pydantic/pydantic-core/pull/1126 | ||
|
||
Url.__add__ = __add__ | ||
Url.__radd__ = __radd__ | ||
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
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