Skip to content

Commit

Permalink
To avoid confusion, config.get() only accepts one pos argument now
Browse files Browse the repository at this point in the history
  • Loading branch information
Taaku18 committed Jul 14, 2023
1 parent fa572ee commit 389dfb6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ however, insignificant breaking changes do not guarantee a major version bump, s
### Changed
- Repo moved to https://github.com/modmail-dev/modmail.

### Internal
- `ConfigManager.get` no longer accepts two positional arguments: the `convert` argument is now keyword-only.

# v4.0.2

### Breaking
Expand Down
2 changes: 1 addition & 1 deletion core/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def __getitem__(self, key: str) -> typing.Any:
def __delitem__(self, key: str) -> None:
return self.remove(key)

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

0 comments on commit 389dfb6

Please sign in to comment.