Skip to content

Commit

Permalink
Fix: settings are broken after upgrading pydantic
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavel Perestoronin committed Dec 14, 2019
1 parent c618ed1 commit 1ad404e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## `3.3.1`

- **Исправление**: парсинг настроек сломан после апгрейда пакетов

## `3.3.0`

- **Обновление**: описания ресурсов
Expand Down
5 changes: 3 additions & 2 deletions bestmobabot/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,16 @@ class BotSettings(BaseModel):
enchant_rune: Optional[EnchantRuneSettings] = None
arena: ArenaSettings

@validator('raid_missions')
@validator('raid_missions', each_item=True)
def lower_raids(cls, value: str) -> str:
return value.lower()

@validator('shops')
@validator('shops', each_item=True)
def lower_shops(cls, value: str) -> str:
return value.lower()


# TODO: unit tests.
class Settings(BaseModel):
vk: VKSettings
bot: BotSettings
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name='bestmobabot',
version='3.3.0',
version='3.3.1',
author='Pavel Perestoronin',
author_email='eigenein@gmail.com',
description='Hero Wars game bot 🏆',
Expand Down

0 comments on commit 1ad404e

Please sign in to comment.