We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 352de24 commit 1621fa5Copy full SHA for 1621fa5
CHANGELOG.md
@@ -4,6 +4,7 @@
4
5
### Fixed
6
7
+- Use the plain python string representation of `Key` in `KeyAlreadyPresent` error message. ([#185](https://github.com/sdispater/tomlkit/issues/185))
8
- Fix the `astimezone()` and `replace()` methods of datetime objects. ([#188](https://github.com/sdispater/tomlkit/issues/188))
9
- Add type definitions for `items()` function. ([#190](https://github.com/sdispater/tomlkit/issues/190))
10
tomlkit/exceptions.py
@@ -194,6 +194,7 @@ class KeyAlreadyPresent(TOMLKitError):
194
"""
195
196
def __init__(self, key):
197
+ key = getattr(key, "key", key)
198
message = f'Key "{key}" already exists.'
199
200
super().__init__(message)
0 commit comments