Skip to content

Conversation

@mega-yujin
Copy link
Collaborator

No description provided.

@mega-yujin mega-yujin added the ready for review This label shows, that your task is ready and I can rewiev it. label Sep 7, 2022
@mega-yujin mega-yujin requested a review from Chudopal September 7, 2022 17:54
Copy link
Owner

@Chudopal Chudopal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Красиво сделано, многие идеи мне нравятся, функции небольшие, по большей части независимые, круто!
Исправь замечания или обоснуй, почему так как ты решил - более правильно будет, и можно мержить

Comment on lines 5 to 6
cats: int
dogs: int
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Позволь пользователю вообще не задавать что-то, вдруг ему не интересны факты о собаках



class ResponseInfo(BaseModel):
cats: tuple[str, ...]
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ну этот тупо может содержать либо строку либо ничего, в модели этого не видно

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

А как тогда правильно? list[str] ?

DOGS_URL = 'http://dog-api.kinduff.com/api/facts'


async def get_facts(url: str, params: dict = None):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

обычно в сигнатуре функций в проекте с FastAPI принято писать Optional[dict] или Union[dict, None], а не задавать явно None

@Chudopal Chudopal added in progress This label indicates that your task is not ready, but you are working on it. and removed ready for review This label shows, that your task is ready and I can rewiev it. labels Sep 8, 2022
@mega-yujin mega-yujin added the ready for review This label shows, that your task is ready and I can rewiev it. label Sep 11, 2022
@mega-yujin mega-yujin requested a review from Chudopal September 11, 2022 13:23
@mega-yujin mega-yujin removed the in progress This label indicates that your task is not ready, but you are working on it. label Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready for review This label shows, that your task is ready and I can rewiev it.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants