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
| Добавь docstring-и в формате reStructuredText ко всем функциям и классам в этом Python-коде. Используй стандарт Sphinx, включая описания параметров (`:param`), типов (`:type`), возвращаемых значений (`:return`, `:rtype`) и возможных исключений (`:raises`, если есть). Стиль должен быть формальный и технически точный. Не переписывай код, просто вставь docstring'и внутрь функций и классов. | |
| Пример: | |
| def foo(a: int) -> str: | |
| """ | |
| Преобразует число в строку. | |
| :param a: Целое число | |
| :type a: int | |
| :return: Строковое представление числа |
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
| from typing import Callable | |
| from prometheus_client import Counter, Histogram, generate_latest | |
| from time import time | |
| from flask import request, Response | |
| REQUEST_COUNT = Counter( | |
| "http_requests_total", | |
| "Total HTTP requests", |
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
| export const A1_CATEGORY_DELAY = { | |
| minutes: 0, | |
| seconds: 0, | |
| }; | |
| export const B1_CATEGORY_DELAY = { | |
| minutes: 1, | |
| seconds: 0, | |
| }; | |
| export const C1_CATEGORY_DELAY = { | |
| minutes: 2, |
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
| from dataclasses import dataclass, field | |
| @dataclass | |
| class VehicleSpecificationsForm: | |
| vehicle_body_length: int | |
| vehicle_body_height: int | |
| vehicle_body_width: int | |
| vehicle_volume_capacity: float = field(init=False) |