Skip to content

Commit 389dfb6

Browse files
committed
To avoid confusion, config.get() only accepts one pos argument now
1 parent fa572ee commit 389dfb6

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ however, insignificant breaking changes do not guarantee a major version bump, s
1515
### Changed
1616
- Repo moved to https://github.com/modmail-dev/modmail.
1717

18+
### Internal
19+
- `ConfigManager.get` no longer accepts two positional arguments: the `convert` argument is now keyword-only.
20+
1821
# v4.0.2
1922

2023
### Breaking

core/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def __getitem__(self, key: str) -> typing.Any:
301301
def __delitem__(self, key: str) -> None:
302302
return self.remove(key)
303303

304-
def get(self, key: str, convert=True) -> typing.Any:
304+
def get(self, key: str, *, convert: bool = True) -> typing.Any:
305305
key = key.lower()
306306
if key not in self.all_keys:
307307
raise InvalidConfigError(f'Configuration "{key}" is invalid.')

0 commit comments

Comments
 (0)