Conversation
…onfig) + some other improvements
Contributor
|
Пайплайн упал |
Contributor
|
Надо еще валидацию сделать |
alex98247
requested changes
Mar 6, 2025
Contributor
|
Еще бы доку на конфигурацию. Что за параметры, за что отвечают на что влияют |
f1i3g3
commented
Mar 27, 2025
f1i3g3
commented
Mar 27, 2025
Comment on lines
23
to
50
| # TODO: solve type problem!!!! | ||
| @staticmethod | ||
| def _parse_json_class_list(resolver: IResolver, json_dicts_list: list[dict]): | ||
| class_list = list() | ||
|
|
||
| for json_dict in json_dicts_list: | ||
| class_name = json_dict.get("name") | ||
|
|
||
| class_params = json_dict.get("params") | ||
|
|
||
| class_ = resolver.load(name=class_name, params=class_params) | ||
| class_list.append(class_) | ||
|
|
||
| return class_list | ||
|
|
||
| @staticmethod | ||
| def _parse_json_class(resolver: IResolver, json_dict: dict): | ||
| class_name = json_dict["name"] | ||
|
|
||
| try: | ||
| class_params = json_dict["params"] | ||
| except KeyError: | ||
| class_params = None | ||
|
|
||
| class_ = resolver.load(name=class_name, params=class_params) | ||
|
|
||
| return class_ | ||
|
|
Contributor
Author
There was a problem hiding this comment.
@alex98247, что мне здесь указать как выводимый тип (и потом упомянуть в документации)? Классы, которые распознаёт парсер, определяются динамически и никак между собой не связаны (можно, конечно, всунуть какой-нибудь интерфейс, но для распознавания критериев из отдельного пакета так не сделать).
Contributor
Author
There was a problem hiding this comment.
Добавил промежуточный класс.
This was
linked to
issues
Apr 1, 2025
Closed
alex98247
approved these changes
Apr 2, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Orchestration of project + support for configuration.
What's new?