Skip to content

Commit b3be792

Browse files
committed
squash: use key_to_option function
1 parent bc22ba8 commit b3be792

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

tmt/config/models/__init__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
from tmt._compat.pydantic import BaseModel, Extra
2-
3-
4-
def create_alias(name: str) -> str:
5-
return name.replace('_', '-')
2+
from tmt.utils import key_to_option
63

74

85
class BaseConfig(BaseModel):
96
class Config:
107
# Accept only keys with dashes instead of underscores
11-
alias_generator = create_alias
8+
alias_generator = key_to_option
129
extra = Extra.forbid
1310
validate_assignment = True

0 commit comments

Comments
 (0)