Skip to content

Commit

Permalink
fix: python version in pyproject
Browse files Browse the repository at this point in the history
  • Loading branch information
danfimov committed Oct 1, 2023
1 parent 74500a3 commit 9d9d51d
Show file tree
Hide file tree
Showing 4 changed files with 135 additions and 7 deletions.
131 changes: 128 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ classifiers = [
"Framework :: AsyncIO",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: Implementation :: CPython",
"Topic :: Software Development :: Libraries :: Application Frameworks",
Expand Down Expand Up @@ -47,7 +49,7 @@ url = "https://pypi.yandex-team.ru/simple"
priority = "supplemental"

[tool.poetry.dependencies]
python = "^3.11"
python = "^3.9"
aiohttp = "^3.8.5"
pydantic = ">= 1.10.12, < 3"
certifi = "^2023.7.22"
Expand Down
5 changes: 3 additions & 2 deletions ya_tracker_client/domain/entities/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import pydantic
from pydantic import BaseModel, ConfigDict


if int(pydantic.VERSION[0]) == 2:
from pydantic.alias_generators import to_camel
else:
Expand All @@ -17,8 +18,8 @@ def to_camel(snake: str) -> str:
:return: The converted camelCase string.
"""
camel = snake.title()
camel = sub('([0-9A-Za-z])_(?=[0-9A-Z])', lambda m: m.group(1), camel) # to PascalCase first
return sub('(^_*[A-Z])', lambda m: m.group(1).lower(), camel)
camel = sub("([0-9A-Za-z])_(?=[0-9A-Z])", lambda m: m.group(1), camel) # to PascalCase first
return sub("(^_*[A-Z])", lambda m: m.group(1).lower(), camel)


def tracker_alias_generator(s: str) -> str:
Expand Down
2 changes: 1 addition & 1 deletion ya_tracker_client/domain/entities/queue_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class QueueField(AbstractEntity):
id: str
name: str
version: int
field_schema: QueueFieldSchema = Field(alias='schema')
field_schema: QueueFieldSchema = Field(alias="schema")
readonly: bool
options: bool
suggest: bool
Expand Down

0 comments on commit 9d9d51d

Please sign in to comment.