From e9185c76cd335d3597b67d8aa7ca10940b400c89 Mon Sep 17 00:00:00 2001 From: Salomon Popp Date: Thu, 13 Aug 2026 16:48:19 +0200 Subject: [PATCH 1/3] refactor(dev): replace basedpyright with ty --- hooks/gen_docs/gen_docs_env_vars.py | 2 +- kpops/api/options.py | 6 +- .../component_handlers/kafka_connect/model.py | 16 +- .../schema_handler/schema_handler.py | 19 +-- kpops/component_handlers/topic/model.py | 30 ++-- .../base_defaults_component.py | 6 +- kpops/components/base_components/helm_app.py | 2 +- .../base_components/models/from_section.py | 6 +- kpops/components/common/topic.py | 6 +- kpops/components/streams_bootstrap/base.py | 16 +- .../streams_bootstrap/common/model.py | 11 +- .../consumer/consumer_app.py | 6 +- .../streams_bootstrap/consumer/model.py | 2 +- .../streams_bootstrap/producer/model.py | 2 +- .../producer/producer_app.py | 8 +- .../streams_bootstrap/streams/model.py | 2 +- .../streams_bootstrap/streams/streams_app.py | 8 +- .../streams_bootstrap_v2/__init__.py | 8 +- kpops/components/streams_bootstrap_v2/base.py | 2 +- .../streams_bootstrap_v2/producer/model.py | 2 +- .../producer/producer_app.py | 14 +- .../streams_bootstrap_v2/streams/model.py | 2 +- .../streams/streams_app.py | 16 +- kpops/config.py | 4 +- kpops/const/file_type.py | 8 +- kpops/core/operation.py | 6 +- kpops/pipeline.py | 2 +- kpops/utils/dict_differ.py | 14 +- kpops/utils/dict_ops.py | 4 +- kpops/utils/enum.py | 12 ++ kpops/utils/gen_schema.py | 16 +- kpops/utils/pydantic.py | 2 +- kpops/utils/yaml.py | 1 + lefthook.yaml | 4 +- pyproject.toml | 44 +---- tests/api/test_registry.py | 18 +- .../schema_handler/test_schema_handler.py | 2 +- .../topic/test_kafka_rest.py | 2 +- .../streams_bootstrap_v2/test_producer_app.py | 1 + .../streams_bootstrap_v2/test_streams_app.py | 1 + .../test_streams_bootstrap.py | 5 +- .../test_base_defaults_component.py | 2 +- tests/components/test_kafka_connector.py | 12 +- tests/components/test_topic.py | 10 +- tests/pipeline/test_components/components.py | 8 +- tests/utils/test_dict_ops.py | 2 +- uv.lock | 161 ++++++++++++++---- 47 files changed, 312 insertions(+), 221 deletions(-) create mode 100644 kpops/utils/enum.py diff --git a/hooks/gen_docs/gen_docs_env_vars.py b/hooks/gen_docs/gen_docs_env_vars.py index b5e95a861..a7b980012 100644 --- a/hooks/gen_docs/gen_docs_env_vars.py +++ b/hooks/gen_docs/gen_docs_env_vars.py @@ -266,7 +266,7 @@ def fill_csv_pipeline_config(target: Path) -> None: ): assert isinstance(field_info, FieldInfo) with suppress(KeyError): # In case the prefix is ever removed from KpopsConfig - env_var_name = KpopsConfig.model_config["env_prefix"] + env_var_name # pyright: ignore[reportTypedDictNotRequiredAccess] + env_var_name = KpopsConfig.model_config["env_prefix"] + env_var_name field_name = concatted_field_name.rsplit(".", 1)[-1] field_description: str = ( field_info.description diff --git a/kpops/api/options.py b/kpops/api/options.py index 19c352e1a..342333a0e 100644 --- a/kpops/api/options.py +++ b/kpops/api/options.py @@ -1,6 +1,6 @@ from __future__ import annotations -from enum import StrEnum +from enum import StrEnum, auto from typing import TYPE_CHECKING if TYPE_CHECKING: @@ -9,8 +9,8 @@ class FilterType(StrEnum): - INCLUDE = "include" - EXCLUDE = "exclude" + INCLUDE = auto() + EXCLUDE = auto() @staticmethod def is_in_steps(component: PipelineComponent, component_names: set[str]) -> bool: diff --git a/kpops/component_handlers/kafka_connect/model.py b/kpops/component_handlers/kafka_connect/model.py index e6bf029d1..408f27f95 100644 --- a/kpops/component_handlers/kafka_connect/model.py +++ b/kpops/component_handlers/kafka_connect/model.py @@ -14,6 +14,7 @@ from typing_extensions import override from kpops.components.common.topic import KafkaTopic, KafkaTopicStr +from kpops.utils.enum import UpperStrEnum from kpops.utils.pydantic import ( DescConfigModel, by_alias, @@ -34,9 +35,9 @@ class KafkaConnectorConfig(DescConfigModel): @override @staticmethod - def json_schema_extra(schema: dict[str, Any], model: type[BaseModel]) -> None: + def json_schema_extra(schema: dict[str, Any], model_cls: type[BaseModel]) -> None: super(KafkaConnectorConfig, KafkaConnectorConfig).json_schema_extra( - schema, model + schema, model_cls ) schema["additional_properties"] = { "type": { @@ -95,13 +96,6 @@ def serialize_model( } -class UpperStrEnum(StrEnum): - @override - @staticmethod - def _generate_next_value_(name: str, *args: Any, **kwargs: Any) -> str: - return name.upper() - - class ConnectorCurrentState(UpperStrEnum): RUNNING = auto() PAUSED = auto() @@ -144,8 +138,8 @@ class ConnectorTaskStatus(BaseModel): class KafkaConnectorType(StrEnum): - SINK = "sink" - SOURCE = "source" + SINK = auto() + SOURCE = auto() class ConnectorStatusResponse(BaseModel): diff --git a/kpops/component_handlers/schema_handler/schema_handler.py b/kpops/component_handlers/schema_handler/schema_handler.py index 1c7240d84..7675dd025 100644 --- a/kpops/component_handlers/schema_handler/schema_handler.py +++ b/kpops/component_handlers/schema_handler/schema_handler.py @@ -4,6 +4,7 @@ from functools import cached_property from typing import TYPE_CHECKING, final +import httpx import structlog from schema_registry.client import AsyncSchemaRegistryClient from schema_registry.client.schema import AvroSchema @@ -29,7 +30,7 @@ class SchemaHandler: def __init__(self, kpops_config: KpopsConfig) -> None: self.schema_registry_client = AsyncSchemaRegistryClient( str(kpops_config.schema_registry.url), - timeout=kpops_config.schema_registry.timeout, # pyright: ignore[reportArgumentType] + timeout=httpx.Timeout(kpops_config.schema_registry.timeout), ) @cached_property @@ -38,7 +39,7 @@ def schema_provider(self) -> SchemaProvider: schema_provider_class = find_class( Registry.iter_component_modules(), base=SchemaProvider ) - return schema_provider_class() # pyright: ignore[reportAbstractUsage] + return schema_provider_class() except ClassNotFoundError as e: msg = f"No schema provider found. Please implement the abstract method in {SchemaProvider.__module__}.{SchemaProvider.__name__}." raise ValueError(msg) from e @@ -127,9 +128,7 @@ async def __submit_schema( ) ) else: - await self.schema_registry_client.register( # pyright: ignore[reportUnknownMemberType] - subject=subject, schema=schema - ) + await self.schema_registry_client.register(subject=subject, schema=schema) log.info( "Schema submitted.", subject=subject, @@ -137,7 +136,7 @@ async def __submit_schema( ) async def __subject_exists(self, subject: str) -> bool: - versions: list[SchemaVersion] = await self.schema_registry_client.get_versions( # pyright: ignore[reportUnknownMemberType] + versions: list[SchemaVersion] = await self.schema_registry_client.get_versions( subject ) return len(versions) > 0 @@ -145,11 +144,11 @@ async def __subject_exists(self, subject: str) -> bool: async def __check_compatibility( self, schema: Schema, schema_class: str, subject: str ) -> None: - registered_version = await self.schema_registry_client.check_version( # pyright: ignore[reportUnknownMemberType] + registered_version = await self.schema_registry_client.check_version( subject, schema ) if registered_version is None: - if not await self.schema_registry_client.test_compatibility( # pyright: ignore[reportUnknownMemberType] + if not await self.schema_registry_client.test_compatibility( subject=subject, schema=schema ): schema_str = ( @@ -163,7 +162,7 @@ async def __check_compatibility( log.debug( "Schema was already submitted. Therefore, the specified schema must be compatible.", subject=subject, - version=registered_version.schema, # pyright: ignore[reportUnknownMemberType] + version=registered_version.schema, ) log.info( @@ -180,7 +179,7 @@ async def __delete_subject(self, subject: str, dry_run: bool) -> None: else: version_list: list[ SchemaVersion - ] = await self.schema_registry_client.delete_subject(subject) # pyright: ignore[reportUnknownMemberType] + ] = await self.schema_registry_client.delete_subject(subject) log.info( "Deleted subject.", subject=subject, diff --git a/kpops/component_handlers/topic/model.py b/kpops/component_handlers/topic/model.py index b631757e1..950781260 100644 --- a/kpops/component_handlers/topic/model.py +++ b/kpops/component_handlers/topic/model.py @@ -1,8 +1,10 @@ -from enum import StrEnum +from enum import auto from typing import Any, ClassVar from pydantic import BaseModel, ConfigDict +from kpops.utils.enum import UpperStrEnum + class TopicSpec(BaseModel): topic_name: str @@ -28,15 +30,15 @@ class TopicResponse(BaseModel): ) -class KafkaTopicConfigSource(StrEnum): - DYNAMIC_TOPIC_CONFIG = "DYNAMIC_TOPIC_CONFIG" - DEFAULT_CONFIG = "DEFAULT_CONFIG" - STATIC_BROKER_CONFIG = "STATIC_BROKER_CONFIG" - DYNAMIC_CLUSTER_LINK_CONFIG = "DYNAMIC_CLUSTER_LINK_CONFIG" - DYNAMIC_BROKER_LOGGER_CONFIG = "DYNAMIC_BROKER_LOGGER_CONFIG" - DYNAMIC_BROKER_CONFIG = "DYNAMIC_BROKER_CONFIG" - DYNAMIC_DEFAULT_BROKER_CONFIG = "DYNAMIC_DEFAULT_BROKER_CONFIG" - UNKNOWN = "UNKNOWN" +class KafkaTopicConfigSource(UpperStrEnum): + DYNAMIC_TOPIC_CONFIG = auto() + DEFAULT_CONFIG = auto() + STATIC_BROKER_CONFIG = auto() + DYNAMIC_CLUSTER_LINK_CONFIG = auto() + DYNAMIC_BROKER_LOGGER_CONFIG = auto() + DYNAMIC_BROKER_CONFIG = auto() + DYNAMIC_DEFAULT_BROKER_CONFIG = auto() + UNKNOWN = auto() class KafkaTopicConfigSynonyms(BaseModel): @@ -68,10 +70,10 @@ class TopicConfigResponse(BaseModel): ) -class KafkaBrokerConfigSource(StrEnum): - STATIC_BROKER_CONFIG = "STATIC_BROKER_CONFIG" - DYNAMIC_BROKER_CONFIG = "DYNAMIC_BROKER_CONFIG" - DEFAULT_CONFIG = "DEFAULT_CONFIG" +class KafkaBrokerConfigSource(UpperStrEnum): + STATIC_BROKER_CONFIG = auto() + DYNAMIC_BROKER_CONFIG = auto() + DEFAULT_CONFIG = auto() class KafkaBrokerConfigSynonyms(BaseModel): diff --git a/kpops/components/base_components/base_defaults_component.py b/kpops/components/base_components/base_defaults_component.py index 0c52deab0..fdf6b578a 100644 --- a/kpops/components/base_components/base_defaults_component.py +++ b/kpops/components/base_components/base_defaults_component.py @@ -48,7 +48,7 @@ class BaseDefaultsComponent(DescConfigModel, ABC): model_config: ClassVar[ConfigDict] = ConfigDict( arbitrary_types_allowed=True, - ignored_types=(cached_property, cached_classproperty), # pyright: ignore[reportArgumentType] + ignored_types=(cached_property, cached_classproperty), # ty: ignore[invalid-argument-type] ) enrich: SkipJsonSchema[bool] = Field( default=True, @@ -83,7 +83,7 @@ def validate_component(self) -> Self: @computed_field @cached_classproperty - def type(cls: type[Self]) -> str: # pyright: ignore[reportGeneralTypeIssues] + def type(cls: type[Self]) -> str: # ty: ignore[invalid-type-form] """Return calling component's type. :returns: Component class name in dash-case @@ -91,7 +91,7 @@ def type(cls: type[Self]) -> str: # pyright: ignore[reportGeneralTypeIssues] return to_dash(cls.__name__) @cached_classproperty - def parents(cls: type[Self]) -> tuple[type[BaseDefaultsComponent], ...]: # pyright: ignore[reportGeneralTypeIssues] + def parents(cls: type[Self]) -> tuple[type[BaseDefaultsComponent], ...]: # ty: ignore[invalid-type-form] """Get parent components. :return: All ancestor KPOps components diff --git a/kpops/components/base_components/helm_app.py b/kpops/components/base_components/helm_app.py index 866c85935..b404f7496 100644 --- a/kpops/components/base_components/helm_app.py +++ b/kpops/components/base_components/helm_app.py @@ -82,7 +82,7 @@ class HelmApp(KubernetesApp): diff_config: SkipGenerate[HelmDiffConfig] = HelmDiffConfig() version: str | None = None timeout: str | None = None - values: HelmAppValues # pyright: ignore[reportIncompatibleVariableOverride] + values: HelmAppValues @cached_property def _helm(self) -> Helm: diff --git a/kpops/components/base_components/models/from_section.py b/kpops/components/base_components/models/from_section.py index 19269c6ee..e2a026026 100644 --- a/kpops/components/base_components/models/from_section.py +++ b/kpops/components/base_components/models/from_section.py @@ -1,4 +1,4 @@ -from enum import StrEnum +from enum import StrEnum, auto from typing import Any, ClassVar, NewType from pydantic import ConfigDict, model_validator @@ -14,8 +14,8 @@ class InputTopicTypes(StrEnum): - PATTERN: extra-topic-pattern or input-topic-pattern """ - INPUT = "input" - PATTERN = "pattern" + INPUT = auto() + PATTERN = auto() class FromTopic(DescConfigModel): diff --git a/kpops/components/common/topic.py b/kpops/components/common/topic.py index c34a47ced..681ac3b9c 100644 --- a/kpops/components/common/topic.py +++ b/kpops/components/common/topic.py @@ -1,7 +1,7 @@ from __future__ import annotations from collections.abc import Iterable -from enum import StrEnum +from enum import StrEnum, auto from typing import Annotated, Any, ClassVar import pydantic @@ -17,8 +17,8 @@ class OutputTopicTypes(StrEnum): - ERROR: error topic """ - OUTPUT = "output" - ERROR = "error" + OUTPUT = auto() + ERROR = auto() class TopicConfig(DescConfigModel): diff --git a/kpops/components/streams_bootstrap/base.py b/kpops/components/streams_bootstrap/base.py index 33c233f4b..033b4d9e0 100644 --- a/kpops/components/streams_bootstrap/base.py +++ b/kpops/components/streams_bootstrap/base.py @@ -20,7 +20,9 @@ from kpops.utils.pydantic import SkipGenerate if TYPE_CHECKING: - from kpops.components.streams_bootstrap_v2.base import StreamsBootstrapV2 + from kpops.components.streams_bootstrap_v2.base import ( + StreamsBootstrapV2, # ty: ignore[deprecated] + ) STREAMS_BOOTSTRAP_HELM_REPO = HelmRepoConfig( repository_name="bakdata-streams-bootstrap", @@ -43,9 +45,9 @@ class StreamsBootstrap(KafkaApp, HelmApp, ABC): :param version: Helm chart version, defaults to "3.6.1" """ - values: StreamsBootstrapValues # pyright: ignore[reportIncompatibleVariableOverride] - repo_config: SkipGenerate[HelmRepoConfig] = STREAMS_BOOTSTRAP_HELM_REPO # pyright: ignore[reportIncompatibleVariableOverride] - version: str = Field( # pyright: ignore[reportIncompatibleVariableOverride] + values: StreamsBootstrapValues + repo_config: SkipGenerate[HelmRepoConfig] = STREAMS_BOOTSTRAP_HELM_REPO + version: str = Field( default=STREAMS_BOOTSTRAP_VERSION, pattern=STREAMS_BOOTSTRAP_VERSION_PATTERN, ) @@ -101,11 +103,11 @@ def manifest_destroy(self) -> tuple[KubernetesManifest, ...]: class StreamsBootstrapCleaner(Cleaner, ABC): """Helm app for resetting and cleaning a streams-bootstrap app.""" - from_: None = None # pyright: ignore[reportIncompatibleVariableOverride] - to: None = None # pyright: ignore[reportIncompatibleVariableOverride] + from_: None = None + to: None = None @classmethod - def from_parent(cls, parent: StreamsBootstrap | StreamsBootstrapV2) -> Self: + def from_parent(cls, parent: StreamsBootstrap | StreamsBootstrapV2) -> Self: # ty: ignore[deprecated] parent_kwargs = parent.model_dump( by_alias=True, exclude_none=True, diff --git a/kpops/components/streams_bootstrap/common/model.py b/kpops/components/streams_bootstrap/common/model.py index cb7a9716f..0ef742faa 100644 --- a/kpops/components/streams_bootstrap/common/model.py +++ b/kpops/components/streams_bootstrap/common/model.py @@ -1,6 +1,6 @@ from __future__ import annotations -from enum import StrEnum +from enum import auto from typing import Any, ClassVar, Self import pydantic @@ -8,6 +8,7 @@ from kpops.components.common.kubernetes_model import ImagePullPolicy, Resources from kpops.components.common.topic import KafkaTopic +from kpops.utils.enum import UpperStrEnum from kpops.utils.pydantic import ( CamelCaseConfigModel, DescConfigModel, @@ -29,10 +30,10 @@ def serialize_labeled_input_topics( } -class JmxRuleType(StrEnum): - GAUGE = "GAUGE" - COUNTER = "COUNTER" - UNTYPED = "UNTYPED" +class JmxRuleType(UpperStrEnum): + GAUGE = auto() + COUNTER = auto() + UNTYPED = auto() class JMXRule(SerializeAsOptionalModel, CamelCaseConfigModel, DescConfigModel): diff --git a/kpops/components/streams_bootstrap/consumer/consumer_app.py b/kpops/components/streams_bootstrap/consumer/consumer_app.py index 9aa186c94..967a2339e 100644 --- a/kpops/components/streams_bootstrap/consumer/consumer_app.py +++ b/kpops/components/streams_bootstrap/consumer/consumer_app.py @@ -23,7 +23,7 @@ class ConsumerAppCleaner(StreamsBootstrapCleaner, StreamsBootstrap): - values: ConsumerAppValues # pyright: ignore[reportIncompatibleVariableOverride] + values: ConsumerAppValues @property @override @@ -85,8 +85,8 @@ class ConsumerApp(StreamsBootstrap): :param values: streams-bootstrap Helm values """ - values: ConsumerAppValues # pyright: ignore[reportIncompatibleVariableOverride] - to: None = Field( # pyright: ignore[reportIncompatibleVariableOverride] + values: ConsumerAppValues + to: None = Field( default=None, alias="to", title="To", diff --git a/kpops/components/streams_bootstrap/consumer/model.py b/kpops/components/streams_bootstrap/consumer/model.py index ce87074e7..30d172818 100644 --- a/kpops/components/streams_bootstrap/consumer/model.py +++ b/kpops/components/streams_bootstrap/consumer/model.py @@ -103,7 +103,7 @@ class ConsumerAppValues(StreamsBootstrapValues): :param termination_grace_period_seconds: Delay for graceful application shutdown in seconds: https://pracucci.com/graceful-shutdown-of-kubernetes-pods.html """ - kafka: ConsumerConfig = ConsumerConfig() # pyright: ignore[reportIncompatibleVariableOverride] + kafka: ConsumerConfig = ConsumerConfig() autoscaling: StreamsAppAutoScaling | None = None stateful_set: bool = False persistence: PersistenceConfig | None = None diff --git a/kpops/components/streams_bootstrap/producer/model.py b/kpops/components/streams_bootstrap/producer/model.py index a22685218..de70c3514 100644 --- a/kpops/components/streams_bootstrap/producer/model.py +++ b/kpops/components/streams_bootstrap/producer/model.py @@ -29,7 +29,7 @@ class ProducerAppValues(StreamsBootstrapValues): :param ttl_seconds_after_finished: See https://kubernetes.io/docs/concepts/workloads/controllers/ttlafterfinished/#ttl-after-finished-controller """ - kafka: ProducerConfig = ProducerConfig() # pyright: ignore[reportIncompatibleVariableOverride] + kafka: ProducerConfig = ProducerConfig() deployment: bool | None = None restart_policy: RestartPolicy | None = None schedule: str | None = None diff --git a/kpops/components/streams_bootstrap/producer/producer_app.py b/kpops/components/streams_bootstrap/producer/producer_app.py index face41022..1f49b226b 100644 --- a/kpops/components/streams_bootstrap/producer/producer_app.py +++ b/kpops/components/streams_bootstrap/producer/producer_app.py @@ -26,8 +26,8 @@ log = structlog.get_logger("ProducerApp") -class ProducerAppCleaner(StreamsBootstrapCleaner, StreamsBootstrap): # pyright: ignore[reportIncompatibleVariableOverride] - values: ProducerAppValues # pyright: ignore[reportIncompatibleVariableOverride] +class ProducerAppCleaner(StreamsBootstrapCleaner, StreamsBootstrap): + values: ProducerAppValues @property @override @@ -64,8 +64,8 @@ class ProducerApp(StreamsBootstrap): :param from_: Producer doesn't support FromSection, defaults to None """ - values: ProducerAppValues # pyright: ignore[reportIncompatibleVariableOverride] - from_: None = Field( # pyright: ignore[reportIncompatibleVariableOverride] + values: ProducerAppValues + from_: None = Field( default=None, alias="from", title="From", diff --git a/kpops/components/streams_bootstrap/streams/model.py b/kpops/components/streams_bootstrap/streams/model.py index bc0146669..d51b5b17d 100644 --- a/kpops/components/streams_bootstrap/streams/model.py +++ b/kpops/components/streams_bootstrap/streams/model.py @@ -112,7 +112,7 @@ class StreamsAppValues(StreamsBootstrapValues): :param termination_grace_period_seconds: Delay for graceful application shutdown in seconds: https://pracucci.com/graceful-shutdown-of-kubernetes-pods.html """ - kafka: StreamsConfig = StreamsConfig() # pyright: ignore[reportIncompatibleVariableOverride] + kafka: StreamsConfig = StreamsConfig() autoscaling: StreamsAppAutoScaling | None = None stateful_set: bool = False persistence: PersistenceConfig | None = None diff --git a/kpops/components/streams_bootstrap/streams/streams_app.py b/kpops/components/streams_bootstrap/streams/streams_app.py index cd1111a5b..4a2651b49 100644 --- a/kpops/components/streams_bootstrap/streams/streams_app.py +++ b/kpops/components/streams_bootstrap/streams/streams_app.py @@ -26,9 +26,9 @@ class StreamsAppCleaner(StreamsBootstrapCleaner, StreamsBootstrap): - from_: None = None # pyright: ignore[reportIncompatibleVariableOverride] - to: None = None # pyright: ignore[reportIncompatibleVariableOverride] - values: StreamsAppValues # pyright: ignore[reportIncompatibleVariableOverride] + from_: None = None + to: None = None + values: StreamsAppValues @property @override @@ -91,7 +91,7 @@ class StreamsApp(StreamsBootstrap): :param values: streams-bootstrap Helm values """ - values: StreamsAppValues # pyright: ignore[reportIncompatibleVariableOverride] + values: StreamsAppValues @cached_property def _cleaner(self) -> StreamsAppCleaner: diff --git a/kpops/components/streams_bootstrap_v2/__init__.py b/kpops/components/streams_bootstrap_v2/__init__.py index 75289d395..729a709ea 100644 --- a/kpops/components/streams_bootstrap_v2/__init__.py +++ b/kpops/components/streams_bootstrap_v2/__init__.py @@ -1,7 +1,9 @@ -from kpops.components.streams_bootstrap_v2.base import StreamsBootstrapV2 +from kpops.components.streams_bootstrap_v2.base import ( + StreamsBootstrapV2, # ty: ignore[deprecated] +) -from .producer.producer_app import ProducerAppV2 -from .streams.streams_app import StreamsAppV2 +from .producer.producer_app import ProducerAppV2 # ty: ignore[deprecated] +from .streams.streams_app import StreamsAppV2 # ty: ignore[deprecated] __all__ = ( "ProducerAppV2", diff --git a/kpops/components/streams_bootstrap_v2/base.py b/kpops/components/streams_bootstrap_v2/base.py index 81bc17dc3..ee4f2983f 100644 --- a/kpops/components/streams_bootstrap_v2/base.py +++ b/kpops/components/streams_bootstrap_v2/base.py @@ -115,7 +115,7 @@ class StreamsBootstrapV2(KafkaApp, HelmApp, ABC): """ values: StreamsBootstrapV2Values - repo_config: SkipGenerate[HelmRepoConfig] = STREAMS_BOOTSTRAP_HELM_REPO # pyright: ignore[reportIncompatibleVariableOverride] + repo_config: SkipGenerate[HelmRepoConfig] = STREAMS_BOOTSTRAP_HELM_REPO version: str | None = STREAMS_BOOTSTRAP_VERSION @pydantic.model_validator(mode="after") diff --git a/kpops/components/streams_bootstrap_v2/producer/model.py b/kpops/components/streams_bootstrap_v2/producer/model.py index b16a040f0..414e0df82 100644 --- a/kpops/components/streams_bootstrap_v2/producer/model.py +++ b/kpops/components/streams_bootstrap_v2/producer/model.py @@ -18,6 +18,6 @@ class ProducerAppV2Values(StreamsBootstrapV2Values): :param streams: Kafka Streams settings """ - streams: ProducerStreamsConfig # pyright: ignore[reportIncompatibleVariableOverride] + streams: ProducerStreamsConfig model_config: ClassVar[ConfigDict] = ConfigDict(extra="allow") diff --git a/kpops/components/streams_bootstrap_v2/producer/producer_app.py b/kpops/components/streams_bootstrap_v2/producer/producer_app.py index 1c4e22a49..407ef16af 100644 --- a/kpops/components/streams_bootstrap_v2/producer/producer_app.py +++ b/kpops/components/streams_bootstrap_v2/producer/producer_app.py @@ -11,15 +11,17 @@ TopicConfig, ) from kpops.components.streams_bootstrap.base import StreamsBootstrapCleaner -from kpops.components.streams_bootstrap_v2.base import StreamsBootstrapV2 +from kpops.components.streams_bootstrap_v2.base import ( + StreamsBootstrapV2, # ty: ignore[deprecated] +) from kpops.components.streams_bootstrap_v2.producer.model import ProducerAppV2Values from kpops.const.file_type import DEFAULTS_YAML, PIPELINE_YAML log = structlog.get_logger("ProducerAppV2") -class ProducerAppCleaner(StreamsBootstrapCleaner, StreamsBootstrapV2): # pyright: ignore[reportIncompatibleVariableOverride] - values: ProducerAppV2Values # pyright: ignore[reportIncompatibleVariableOverride] +class ProducerAppCleaner(StreamsBootstrapCleaner, StreamsBootstrapV2): # ty: ignore[deprecated] + values: ProducerAppV2Values @property @override @@ -30,7 +32,7 @@ def helm_chart(self) -> str: @deprecated("ProducerAppV2 component is deprecated, use ProducerApp instead.") -class ProducerAppV2(StreamsBootstrapV2): +class ProducerAppV2(StreamsBootstrapV2): # ty: ignore[deprecated] """Producer component. This producer holds configuration to use as values for the streams-bootstrap @@ -42,8 +44,8 @@ class ProducerAppV2(StreamsBootstrapV2): :param from_: Producer doesn't support FromSection, defaults to None """ - values: ProducerAppV2Values # pyright: ignore[reportIncompatibleVariableOverride] - from_: None = Field( # pyright: ignore[reportIncompatibleVariableOverride] + values: ProducerAppV2Values + from_: None = Field( default=None, alias="from", title="From", diff --git a/kpops/components/streams_bootstrap_v2/streams/model.py b/kpops/components/streams_bootstrap_v2/streams/model.py index d5a3b9bf3..0c80b9dfb 100644 --- a/kpops/components/streams_bootstrap_v2/streams/model.py +++ b/kpops/components/streams_bootstrap_v2/streams/model.py @@ -192,7 +192,7 @@ class StreamsAppV2Values(StreamsBootstrapV2Values): :param autoscaling: Kubernetes event-driven autoscaling config, defaults to None """ - streams: StreamsConfig # pyright: ignore[reportIncompatibleVariableOverride] + streams: StreamsConfig autoscaling: StreamsAppAutoScaling | None = None stateful_set: bool = False persistence: PersistenceConfig = PersistenceConfig() diff --git a/kpops/components/streams_bootstrap_v2/streams/streams_app.py b/kpops/components/streams_bootstrap_v2/streams/streams_app.py index 887aee64d..7c3b2f98c 100644 --- a/kpops/components/streams_bootstrap_v2/streams/streams_app.py +++ b/kpops/components/streams_bootstrap_v2/streams/streams_app.py @@ -9,7 +9,9 @@ from kpops.components.common.app_type import AppType from kpops.components.common.topic import KafkaTopic from kpops.components.streams_bootstrap.base import StreamsBootstrapCleaner -from kpops.components.streams_bootstrap_v2.base import StreamsBootstrapV2 +from kpops.components.streams_bootstrap_v2.base import ( + StreamsBootstrapV2, # ty: ignore[deprecated] +) from kpops.components.streams_bootstrap_v2.streams.model import ( StreamsAppV2Values, ) @@ -18,10 +20,10 @@ log = structlog.get_logger("StreamsAppV2") -class StreamsAppCleaner(StreamsBootstrapCleaner, StreamsBootstrapV2): - from_: None = None # pyright: ignore[reportIncompatibleVariableOverride] - to: None = None # pyright: ignore[reportIncompatibleVariableOverride] - values: StreamsAppV2Values # pyright: ignore[reportIncompatibleVariableOverride] +class StreamsAppCleaner(StreamsBootstrapCleaner, StreamsBootstrapV2): # ty: ignore[deprecated] + from_: None = None + to: None = None + values: StreamsAppV2Values @property @override @@ -48,13 +50,13 @@ async def clean_pvcs(self, dry_run: bool) -> None: @deprecated("StreamsAppV2 component is deprecated, use StreamsApp instead.") -class StreamsAppV2(StreamsBootstrapV2): +class StreamsAppV2(StreamsBootstrapV2): # ty: ignore[deprecated] """StreamsAppV2 component that configures a streams-bootstrap-v2 app. :param values: streams-bootstrap-v2 Helm values """ - values: StreamsAppV2Values # pyright: ignore[reportIncompatibleVariableOverride] + values: StreamsAppV2Values @cached_property def _cleaner(self) -> StreamsAppCleaner: diff --git a/kpops/config.py b/kpops/config.py index b986b30fa..5265eb21b 100644 --- a/kpops/config.py +++ b/kpops/config.py @@ -183,9 +183,7 @@ def create( YamlConfigSettingsSource.config_dir = config_dir if environment: YamlConfigSettingsSource.environment = environment - cls._instance = KpopsConfig( - _env_file=dotenv # pyright: ignore[reportCallIssue] - ) + cls._instance = KpopsConfig(_env_file=dotenv) if operation_mode: cls._instance.operation_mode = operation_mode return cls._instance diff --git a/kpops/const/file_type.py b/kpops/const/file_type.py index b0ff54312..2166a792d 100644 --- a/kpops/const/file_type.py +++ b/kpops/const/file_type.py @@ -1,6 +1,6 @@ from __future__ import annotations -from enum import StrEnum +from enum import StrEnum, auto FILE_EXTENSION = ".yaml" @@ -14,9 +14,9 @@ class KpopsFileType(StrEnum): CONFIG (str): Represents a config YAML file type. """ - PIPELINE = "pipeline" - DEFAULTS = "defaults" - CONFIG = "config" + PIPELINE = auto() + DEFAULTS = auto() + CONFIG = auto() def as_yaml_file(self, prefix: str = "", suffix: str = "") -> str: """Generate a YAML file name based on the enum value with optional prefix and suffix. diff --git a/kpops/core/operation.py b/kpops/core/operation.py index dc1f155cc..f1ddbbace 100644 --- a/kpops/core/operation.py +++ b/kpops/core/operation.py @@ -4,6 +4,6 @@ class OperationMode(enum.StrEnum): - ARGO = "argo" - MANIFEST = "manifest" - MANAGED = "managed" + ARGO = enum.auto() + MANIFEST = enum.auto() + MANAGED = enum.auto() diff --git a/kpops/pipeline.py b/kpops/pipeline.py index 59df17fd8..b5cac6cf1 100644 --- a/kpops/pipeline.py +++ b/kpops/pipeline.py @@ -369,7 +369,7 @@ def load_yaml(self, path: Path, environment: str | None) -> Pipeline: msg = f"The pipeline definition {env_file} should contain a list of components" raise TypeError(msg) - return self.parse(main_content, env_content) # pyright: ignore[reportUnknownArgumentType] + return self.parse(main_content, env_content) def parse_components(self, components: list[dict[str, Any]]) -> None: """Instantiate, enrich and inflate a list of components. diff --git a/kpops/utils/dict_differ.py b/kpops/utils/dict_differ.py index 06f136d07..a5893a837 100644 --- a/kpops/utils/dict_differ.py +++ b/kpops/utils/dict_differ.py @@ -3,7 +3,7 @@ from collections.abc import Mapping, MutableMapping from dataclasses import dataclass from difflib import Differ -from enum import StrEnum +from enum import StrEnum, auto from typing import TYPE_CHECKING, Any, Generic, NamedTuple, TypeVar, cast import typer @@ -19,9 +19,9 @@ class DiffType(StrEnum): - ADD = "add" - CHANGE = "change" - REMOVE = "remove" + ADD = auto() + CHANGE = auto() + REMOVE = auto() @staticmethod def from_str(label: str) -> DiffType: @@ -50,7 +50,7 @@ def factory( case DiffType.CHANGE: change = cast(tuple[_O, _N], change) return Change(*change) - msg = f"{type} is not part of {DiffType}" # pyright: ignore[reportUnreachable] + msg = f"{type} is not part of {DiffType}" raise ValueError(msg) @@ -65,13 +65,13 @@ def from_dicts( d1: dict[str, Any], d2: dict[str, Any], ignore: set[str] | None = None ) -> Iterator[Diff[Any, Any]]: for diff_type, keys, changes in diff(d1, d2, ignore=ignore): - diff_type = DiffType.from_str(diff_type) # pyright: ignore[reportUnknownArgumentType] + diff_type = DiffType.from_str(diff_type) if not isinstance(changes_tmp := changes, list): changes_tmp: list[tuple[str, Any]] = [("", changes)] for key, change in changes_tmp: yield Diff( diff_type, - Diff.__find_changed_key(keys, key), # pyright: ignore[reportUnknownArgumentType] + Diff.__find_changed_key(keys, key), Change.factory(diff_type, change), ) diff --git a/kpops/utils/dict_ops.py b/kpops/utils/dict_ops.py index 01e018fca..b5e444b5f 100644 --- a/kpops/utils/dict_ops.py +++ b/kpops/utils/dict_ops.py @@ -28,7 +28,7 @@ def update_nested_pair( if isinstance(value, Mapping): nested_val = original_dict.get(key, {}) if isinstance(nested_val, dict): - original_dict[key] = update_nested_pair(nested_val, value) + original_dict[key] = update_nested_pair(nested_val, value) # ty: ignore[invalid-assignment] elif key not in original_dict: original_dict[key] = value return original_dict @@ -77,7 +77,7 @@ def flatten_mapping( if prefix: key = prefix + separator + key if isinstance(value, Mapping): - nested_mapping = flatten_mapping(value, key, separator) # pyright: ignore[reportAssignmentType,reportUnknownArgumentType] + nested_mapping = flatten_mapping(value, key, separator) top = update_nested_pair(top, nested_mapping) else: top[key] = value diff --git a/kpops/utils/enum.py b/kpops/utils/enum.py new file mode 100644 index 000000000..8212a5279 --- /dev/null +++ b/kpops/utils/enum.py @@ -0,0 +1,12 @@ +from enum import StrEnum + +from typing_extensions import override + + +class UpperStrEnum(StrEnum): + @override + @staticmethod + def _generate_next_value_( + name: str, start: int, count: int, last_values: list[str] + ) -> str: + return name.upper() diff --git a/kpops/utils/gen_schema.py b/kpops/utils/gen_schema.py index 5a81b0cf5..e230ad6f9 100644 --- a/kpops/utils/gen_schema.py +++ b/kpops/utils/gen_schema.py @@ -74,14 +74,14 @@ def gen_pipeline_schema() -> None: # re-assign component type as Literal to work as discriminator for component in components: component.model_fields["type"] = FieldInfo( - annotation=Literal[component.type], # pyright: ignore[reportArgumentType] + annotation=Literal[component.type], # ty: ignore[invalid-type-form] default=component.type, ) - core_schema: DefinitionsSchema = component.__pydantic_core_schema__ # pyright: ignore[reportAssignmentType] + core_schema: DefinitionsSchema = component.__pydantic_core_schema__ # ty: ignore[invalid-assignment] schema = core_schema - while "schema" in schema: - schema = schema["schema"] - model_schema: ModelFieldsSchema = schema # pyright: ignore[reportAssignmentType] + while "schema" in schema: # ty: ignore[unsupported-operator] + schema = schema["schema"] # ty: ignore[not-subscriptable] + model_schema: ModelFieldsSchema = schema # ty: ignore[invalid-assignment] model_schema["fields"]["type"] = ModelField( type="model-field", schema=LiteralSchema( @@ -92,13 +92,11 @@ def gen_pipeline_schema() -> None: PipelineComponents = Union[tuple(components)] AnnotatedPipelineComponents = Annotated[ - PipelineComponents, Field(discriminator="type") + PipelineComponents, Field(discriminator="type") # ty: ignore[invalid-type-form] ] class PipelineSchema(RootModel[Sequence[AnnotatedPipelineComponents]]): - root: Sequence[ - AnnotatedPipelineComponents # pyright: ignore[reportInvalidTypeForm] - ] + root: Sequence[AnnotatedPipelineComponents] print_schema(PipelineSchema) diff --git a/kpops/utils/pydantic.py b/kpops/utils/pydantic.py index 002a6e284..b6c3bbad2 100644 --- a/kpops/utils/pydantic.py +++ b/kpops/utils/pydantic.py @@ -187,7 +187,7 @@ def json_schema_extra(schema: dict[str, Any], model_cls: type[BaseModel]) -> Non for field_name, field_info in model_cls.model_fields.items(): if field_info.description: continue # skip, manually assigned description takes precedence - if any(isinstance(m, SkipJsonSchema) for m in field_info.metadata): # pyright: ignore[reportArgumentType] + if any(isinstance(m, SkipJsonSchema) for m in field_info.metadata): # ty: ignore[invalid-argument-type] continue field_alias = by_alias(model_cls, field_name) defining_class = find_defining_class(model_cls, field_name) diff --git a/kpops/utils/yaml.py b/kpops/utils/yaml.py index 85f248a1a..a7858ba7d 100644 --- a/kpops/utils/yaml.py +++ b/kpops/utils/yaml.py @@ -5,6 +5,7 @@ import structlog import yaml +import yaml.representer from cachetools import cached from cachetools.keys import hashkey from rich.console import Console diff --git a/lefthook.yaml b/lefthook.yaml index c722acca9..e7199db6a 100644 --- a/lefthook.yaml +++ b/lefthook.yaml @@ -14,9 +14,9 @@ pre-commit: glob: "*.py" run: uv run ruff format --force-exclude --config pyproject.toml {staged_files} stage_fixed: true - basedpyright: + ty: glob: "*.py" - run: uv run basedpyright + run: uv run ty check dprint: glob: "*.{json,jsonc,yaml,yml,md,toml,css}" run: dprint fmt diff --git a/pyproject.toml b/pyproject.toml index f907daf0d..cd2bca0d9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,7 +24,7 @@ dependencies = [ "croniter>=3.0.3", "dictdiffer>=0.9.0", "httpx2>=2.6.0", - "lightkube>=0.15.3", + "lightkube>=1.0.0", "pydantic>=2.10.6", "pydantic-settings>=2.0.3", "pyhumps>=3.7.3", @@ -41,7 +41,6 @@ kpops = "kpops.cli.main:cli" [dependency-groups] dev = [ - "basedpyright>=1.39.9", "httpx2-pytest>=1.0.1", "lefthook>=1.10.4", "polyfactory>=2.13.0", @@ -53,6 +52,7 @@ dev = [ "pytest-snapshot>=0.9.0", "pytest-timeout>=2.3.1", "ruff>=0.16.0", + "ty>=0.0.71", ] docs = [ "mdx-truly-sane-lists>=1.3", @@ -69,44 +69,8 @@ docs = [ requires = ["hatchling"] build-backend = "hatchling.build" -[tool.basedpyright] -include = ["kpops", "tests", "hooks"] -allowedUntypedLibraries = ["pytablewriter"] - -failOnWarnings = false # CLI usage - -reportImportCycles = true - -reportUnknownParameterType = "warning" -reportUnknownArgumentType = "warning" -reportUnknownLambdaType = "warning" -reportUnknownVariableType = "warning" -reportUnknownMemberType = "warning" - -reportIncompatibleVariableOverride = "warning" -reportIncompatibleMethodOverride = "warning" - -reportUnusedParameter = "hint" -reportDeprecated = "hint" - -reportMissingParameterType = "error" -reportMissingTypeArgument = "error" -reportUnannotatedClassAttribute = "error" - -reportAny = false -reportExplicitAny = false -reportImplicitStringConcatenation = false -reportUnusedCallResult = false -# false positive for Pydantic https://github.com/DetachHead/basedpyright/issues/868 -reportUnsafeMultipleInheritance = false - -# we can't do much about it if a library doesn't provide types -reportMissingTypeStubs = false -# TODO: apply only to 3rd party libs such as lightkube -strictParameterNoneValue = false - -# TODO: apply only to tests https://github.com/DetachHead/basedpyright/issues/668 -reportPrivateUsage = false +[tool.ty] +src = { include = ["kpops", "tests", "hooks"] } [tool.hatch.build.targets.wheel] packages = ["kpops"] diff --git a/tests/api/test_registry.py b/tests/api/test_registry.py index 0a8d74026..22604ba21 100644 --- a/tests/api/test_registry.py +++ b/tests/api/test_registry.py @@ -22,9 +22,15 @@ StreamsApp, StreamsBootstrap, ) -from kpops.components.streams_bootstrap_v2 import StreamsBootstrapV2 -from kpops.components.streams_bootstrap_v2.producer.producer_app import ProducerAppV2 -from kpops.components.streams_bootstrap_v2.streams.streams_app import StreamsAppV2 +from kpops.components.streams_bootstrap_v2 import ( + StreamsBootstrapV2, # ty: ignore[deprecated] +) +from kpops.components.streams_bootstrap_v2.producer.producer_app import ( + ProducerAppV2, # ty: ignore[deprecated] +) +from kpops.components.streams_bootstrap_v2.streams.streams_app import ( + StreamsAppV2, # ty: ignore[deprecated] +) from kpops.core.exception import ClassNotFoundError from kpops.core.registry import Registry, _find_classes, _iter_namespace, find_class from tests.cli.resources.custom_module import CustomSchemaProvider @@ -106,12 +112,12 @@ def test_registry() -> None: "kafka-source-connector": KafkaSourceConnector, "kubernetes-app": KubernetesApp, "pipeline-component": PipelineComponent, - "producer-app-v2": ProducerAppV2, + "producer-app-v2": ProducerAppV2, # ty: ignore[deprecated] "producer-app": ProducerApp, "consumer-app": ConsumerApp, - "streams-app-v2": StreamsAppV2, + "streams-app-v2": StreamsAppV2, # ty: ignore[deprecated] "streams-app": StreamsApp, - "streams-bootstrap-v2": StreamsBootstrapV2, + "streams-bootstrap-v2": StreamsBootstrapV2, # ty: ignore[deprecated] "streams-bootstrap": StreamsBootstrap, } for _type, _class in registry._classes.items(): diff --git a/tests/component_handlers/schema_handler/test_schema_handler.py b/tests/component_handlers/schema_handler/test_schema_handler.py index 3c9a09aab..cc70face0 100644 --- a/tests/component_handlers/schema_handler/test_schema_handler.py +++ b/tests/component_handlers/schema_handler/test_schema_handler.py @@ -215,7 +215,7 @@ async def test_should_log_debug_when_submit_schema_that_exists_and_registered_un assert { "event": "Schema was already submitted. Therefore, the specified schema must be compatible.", "subject": "topic-X-value", - "version": registered_version.schema, # pyright: ignore[reportUnknownMemberType] + "version": registered_version.schema, "log_level": "debug", } in cap_logs diff --git a/tests/component_handlers/topic/test_kafka_rest.py b/tests/component_handlers/topic/test_kafka_rest.py index 2cc97a914..c9a54f4a7 100644 --- a/tests/component_handlers/topic/test_kafka_rest.py +++ b/tests/component_handlers/topic/test_kafka_rest.py @@ -27,7 +27,7 @@ class TestKafkaRest: @pytest_asyncio.fixture() async def kafka_rest(self, httpx_mock: HTTPXMock) -> KafkaRest: - config = KpopsConfig() # pyright: ignore[reportCallIssue] + config = KpopsConfig() kafka_rest = KafkaRest(config.kafka_rest) content = await Path( RESOURCES_PATH / "kafka_rest_proxy_responses" / "cluster-info.json", diff --git a/tests/components/streams_bootstrap_v2/test_producer_app.py b/tests/components/streams_bootstrap_v2/test_producer_app.py index 1e7557ef0..23b3a52f6 100644 --- a/tests/components/streams_bootstrap_v2/test_producer_app.py +++ b/tests/components/streams_bootstrap_v2/test_producer_app.py @@ -1,3 +1,4 @@ +# ty: ignore[deprecated] from unittest.mock import ANY, MagicMock import pytest diff --git a/tests/components/streams_bootstrap_v2/test_streams_app.py b/tests/components/streams_bootstrap_v2/test_streams_app.py index fb9bb57db..a6b7343a7 100644 --- a/tests/components/streams_bootstrap_v2/test_streams_app.py +++ b/tests/components/streams_bootstrap_v2/test_streams_app.py @@ -1,3 +1,4 @@ +# ty: ignore[deprecated] import re from collections.abc import AsyncIterator from pathlib import Path diff --git a/tests/components/streams_bootstrap_v2/test_streams_bootstrap.py b/tests/components/streams_bootstrap_v2/test_streams_bootstrap.py index 22c27e29c..8ba5180c7 100644 --- a/tests/components/streams_bootstrap_v2/test_streams_bootstrap.py +++ b/tests/components/streams_bootstrap_v2/test_streams_bootstrap.py @@ -1,3 +1,4 @@ +# ty: ignore[deprecated] import re import pytest @@ -9,7 +10,9 @@ HelmUpgradeInstallFlags, ) from kpops.component_handlers.helm.utils import create_helm_release_name -from kpops.components.streams_bootstrap_v2 import StreamsBootstrapV2 +from kpops.components.streams_bootstrap_v2 import ( + StreamsBootstrapV2, +) from kpops.components.streams_bootstrap_v2.base import StreamsBootstrapV2Values diff --git a/tests/components/test_base_defaults_component.py b/tests/components/test_base_defaults_component.py index 739bc193c..7faaf93f6 100644 --- a/tests/components/test_base_defaults_component.py +++ b/tests/components/test_base_defaults_component.py @@ -251,7 +251,7 @@ def test_get_defaults_file_paths( environment: str | None, expected_default_paths: list[Path], ) -> None: - config = KpopsConfig() # pyright: ignore[reportCallIssue] + config = KpopsConfig() config.pipeline_base_dir = PIPELINE_BASE_DIR actual_default_paths = get_defaults_file_paths( pipeline_path, diff --git a/tests/components/test_kafka_connector.py b/tests/components/test_kafka_connector.py index e9c7778eb..b5b7388df 100644 --- a/tests/components/test_kafka_connector.py +++ b/tests/components/test_kafka_connector.py @@ -57,7 +57,7 @@ def test_connector_config_name_override(self, connector: KafkaConnector) -> None connector = KafkaConnector( name=CONNECTOR_NAME, - config={"connector.class": CONNECTOR_CLASS}, # pyright: ignore[reportArgumentType], gets enriched + config={"connector.class": CONNECTOR_CLASS}, # gets enriched ) assert connector.config.name == CONNECTOR_FULL_NAME @@ -69,7 +69,10 @@ def test_connector_config_name_override(self, connector: KafkaConnector) -> None ): KafkaConnector( name=CONNECTOR_NAME, - config={"connector.class": CONNECTOR_CLASS, "name": "different-name"}, # pyright: ignore[reportArgumentType], gets enriched + config={ + "connector.class": CONNECTOR_CLASS, + "name": "different-name", + }, # gets enriched ) with pytest.raises( @@ -80,5 +83,8 @@ def test_connector_config_name_override(self, connector: KafkaConnector) -> None ): KafkaConnector( name=CONNECTOR_NAME, - config={"connector.class": CONNECTOR_CLASS, "name": ""}, # pyright: ignore[reportArgumentType], gets enriched + config={ + "connector.class": CONNECTOR_CLASS, + "name": "", + }, # gets enriched ) diff --git a/tests/components/test_topic.py b/tests/components/test_topic.py index 2930efbb6..291fe3dd1 100644 --- a/tests/components/test_topic.py +++ b/tests/components/test_topic.py @@ -28,16 +28,16 @@ def test_kafka_topic_str(self) -> None: assert model.topic is None assert model.model_dump()["topic"] is None - model = Model(topic="topic-name") # pyright: ignore[reportArgumentType] + model = Model(topic="topic-name") # ty: ignore[invalid-argument-type] assert model.topic == KafkaTopic(name="topic-name") assert model.model_dump()["topic"] == "topic-name" exc_msg = "Topic should be a valid KafkaTopic instance or topic name string" - with pytest.raises(ValueError, match=re.escape(exc_msg)): - Model(topic="") # pyright: ignore[reportArgumentType] + with pytest.raises(pydantic.ValidationError, match=re.escape(exc_msg)): + Model(topic="") # ty: ignore[invalid-argument-type] - with pytest.raises(ValueError, match=re.escape(exc_msg)): - Model(topic=1) # pyright: ignore[reportArgumentType] + with pytest.raises(pydantic.ValidationError, match=re.escape(exc_msg)): + Model(topic=1) # ty: ignore[invalid-argument-type] @pytest.mark.parametrize( ("input", "expected"), diff --git a/tests/pipeline/test_components/components.py b/tests/pipeline/test_components/components.py index 8035d2dfb..1e39757da 100644 --- a/tests/pipeline/test_components/components.py +++ b/tests/pipeline/test_components/components.py @@ -44,7 +44,7 @@ def inflate(self) -> list[PipelineComponent]: if topic_config.type == OutputTopicTypes.OUTPUT: kafka_connector = KafkaSinkConnector( name=f"{self.name}-inflated-sink-connector", - config={ # pyright: ignore[reportArgumentType], required `connector.class` comes from defaults during enrichment + config={ # required `connector.class` comes from defaults during enrichment "topics": topic_name, "transforms.changeTopic.replacement": f"{topic_name}-index-v1", }, @@ -60,7 +60,7 @@ def inflate(self) -> list[PipelineComponent]: ), ) inflate_steps.append(kafka_connector) - streams_app = StreamsApp( # pyright: ignore[reportCallIssue] + streams_app = StreamsApp( name=f"{self.name}-inflated-streams-app", to=ToSection( topics={ @@ -69,7 +69,7 @@ def inflate(self) -> list[PipelineComponent]: ): TopicConfig(type=OutputTopicTypes.OUTPUT) } ).model_dump(), - ) + ) # ty: ignore[missing-argument] inflate_steps.append(streams_app) return inflate_steps @@ -95,6 +95,6 @@ class SimpleInflateConnectors(StreamsApp): def inflate(self) -> list[PipelineComponent]: connector = KafkaSinkConnector( name="inflated-connector-name", - config={}, # pyright: ignore[reportArgumentType] + config={}, ) return [self, connector] diff --git a/tests/utils/test_dict_ops.py b/tests/utils/test_dict_ops.py index 8d290c97d..a87c477d2 100644 --- a/tests/utils/test_dict_ops.py +++ b/tests/utils/test_dict_ops.py @@ -24,7 +24,7 @@ def test_update_nested(self, mocker: MockerFixture) -> None: ) update_nested_pair_mock.return_value = expected - actual = update_nested(*dicts) # pyright: ignore[reportArgumentType] + actual = update_nested(*dicts) update_nested_pair_mock.assert_has_calls( [ diff --git a/uv.lock b/uv.lock index e28a867e9..3efcf73fe 100644 --- a/uv.lock +++ b/uv.lock @@ -42,18 +42,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/ed/20/bc79bc575ba2e2a7f70e8a1155618bb1301eaa5132a8271373a6903f73f8/babel-2.16.0-py3-none-any.whl", hash = "sha256:368b5b98b37c06b7daf6696391c3240c938b37767d4584413e8438c5c435fa8b", size = 9587599, upload-time = "2024-08-08T14:25:42.686Z" }, ] -[[package]] -name = "basedpyright" -version = "1.39.9" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "nodejs-wheel-binaries" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/7a/4b/c1f4e211e50389304d6af32b9280e026a7133e3ad59bbdf8f7a3250f8bee/basedpyright-1.39.9.tar.gz", hash = "sha256:32cbea5fc8273e89df3db20daea56cb7286e419ccdfdc479c64759d2dc071901", size = 24412216, upload-time = "2026-06-27T02:19:49.834Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/2a/d4/e1fa108710d0498a18c77b1e13897f31eab47c69aa8cfe2d2a4df746541e/basedpyright-1.39.9-py3-none-any.whl", hash = "sha256:6b0837b9eba972c71895167ab9b127e6afdbc17abc92312e3f8d15ca82a5611c", size = 13374276, upload-time = "2026-06-27T02:19:54.431Z" }, -] - [[package]] name = "beautifulsoup4" version = "4.12.3" @@ -289,6 +277,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" }, ] +[[package]] +name = "h2" +version = "4.4.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "hpack" }, + { name = "hyperframe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/e7/85/7c366e69d84c17bb778fe41419e1fbcce3033d5b7ce29bbffff0a98b859f/h2-4.4.1.tar.gz", hash = "sha256:4e866ffb1a869ae14dd9b5e6beb5c24a13da0495ad72b65925ded182521c1516", size = 2157281, upload-time = "2026-08-03T11:45:09.509Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/7e/22/e85faf23bd72a92d1921e37d674ca56eb298a3c8be31fdecef0ff2b3aaac/h2-4.4.1-py3-none-any.whl", hash = "sha256:0e25f1462b23c9cb82d9eb02e28bc706dac2a68cb457c6a0d74d63c8a2a5d0e6", size = 62636, upload-time = "2026-08-03T11:44:59.164Z" }, +] + [[package]] name = "hjson" version = "3.1.0" @@ -298,6 +299,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/1f/7f/13cd798d180af4bf4c0ceddeefba2b864a63c71645abc0308b768d67bb81/hjson-3.1.0-py3-none-any.whl", hash = "sha256:65713cdcf13214fb554eb8b4ef803419733f4f5e551047c9b711098ab7186b89", size = 54018, upload-time = "2022-08-13T02:52:59.899Z" }, ] +[[package]] +name = "hpack" +version = "4.2.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/26/5b/fcabf6028144a8723726318b07a32c2f3314acdff6265743cf08a344b18e/hpack-4.2.0.tar.gz", hash = "sha256:0895cfa3b5531fc65fe439c05eb65144f123bf7a394fcaa56aa423548d8e45c0", size = 51300, upload-time = "2026-06-23T18:34:46.667Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/71/b4/4a9fcfb2aef6ba44d9073ecd301443aa00b3dac95de5619f2a7de7ec8a91/hpack-4.2.0-py3-none-any.whl", hash = "sha256:858ac0b02280fa582b5080d68db0899c62a80375e0e5413a74970c5e518b6986", size = 34246, upload-time = "2026-06-23T18:34:45.472Z" }, +] + [[package]] name = "httpcore" version = "1.0.9" @@ -355,6 +365,14 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/47/86/7d82f7c6aac32433eaf0c914b8bc870ae25759413b9d7d52ea6aa15f2546/httpx2-2.6.0-py3-none-any.whl", hash = "sha256:6cccc3665d6bceb3c1c4f1422ae7e53fda67a853f0135f09b25ce0d4dcac01e3", size = 88541, upload-time = "2026-07-14T10:48:32.681Z" }, ] +[package.optional-dependencies] +http2 = [ + { name = "h2" }, +] +ws = [ + { name = "wsproto" }, +] + [[package]] name = "httpx2-pytest" version = "1.0.1" @@ -368,6 +386,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/46/ef/e9b6fb576f1f518f68e9f9cce9776870452ae2b8cfbba53b4127701b9a55/httpx2_pytest-1.0.1-py3-none-any.whl", hash = "sha256:09ff3365101508c5b311301c6ee8e1a96dbb676028b19e00da66199d2e759a99", size = 20975, upload-time = "2026-05-22T15:02:54.007Z" }, ] +[[package]] +name = "hyperframe" +version = "6.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/02/e7/94f8232d4a74cc99514c13a9f995811485a6903d48e5d952771ef6322e30/hyperframe-6.1.0.tar.gz", hash = "sha256:f630908a00854a7adeabd6382b43923a4c4cd4b821fcb527e6ab9e15382a3b08", size = 26566, upload-time = "2025-01-22T21:41:49.302Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/48/30/47d0bf6072f7252e6521f3447ccfa40b421b6824517f82854703d0f5a98b/hyperframe-6.1.0-py3-none-any.whl", hash = "sha256:b03380493a519fce58ea5af42e4a42317bf9bd425596f7a0835ffce80f1a42e5", size = 13007, upload-time = "2025-01-22T21:41:47.295Z" }, +] + [[package]] name = "idna" version = "3.18" @@ -470,7 +497,6 @@ dependencies = [ [package.dev-dependencies] dev = [ - { name = "basedpyright" }, { name = "httpx2-pytest" }, { name = "lefthook" }, { name = "polyfactory" }, @@ -482,6 +508,7 @@ dev = [ { name = "pytest-snapshot" }, { name = "pytest-timeout" }, { name = "ruff" }, + { name = "ty" }, ] docs = [ { name = "mdx-truly-sane-lists" }, @@ -501,7 +528,7 @@ requires-dist = [ { name = "croniter", specifier = ">=3.0.3" }, { name = "dictdiffer", specifier = ">=0.9.0" }, { name = "httpx2", specifier = ">=2.6.0" }, - { name = "lightkube", specifier = ">=0.15.3" }, + { name = "lightkube", specifier = ">=1.0.0" }, { name = "pydantic", specifier = ">=2.10.6" }, { name = "pydantic-settings", specifier = ">=2.0.3" }, { name = "pyhumps", specifier = ">=3.7.3" }, @@ -515,7 +542,6 @@ requires-dist = [ [package.metadata.requires-dev] dev = [ - { name = "basedpyright", specifier = ">=1.39.9" }, { name = "httpx2-pytest", specifier = ">=1.0.1" }, { name = "lefthook", specifier = ">=1.10.4" }, { name = "polyfactory", specifier = ">=2.13.0" }, @@ -527,6 +553,7 @@ dev = [ { name = "pytest-snapshot", specifier = ">=0.9.0" }, { name = "pytest-timeout", specifier = ">=2.3.1" }, { name = "ruff", specifier = ">=0.16.0" }, + { name = "ty", specifier = ">=0.0.71" }, ] docs = [ { name = "mdx-truly-sane-lists", specifier = ">=1.3" }, @@ -550,16 +577,17 @@ wheels = [ [[package]] name = "lightkube" -version = "0.16.2" +version = "1.0.1" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "httpx" }, + { name = "httpx2", extra = ["http2", "ws"] }, { name = "lightkube-models" }, + { name = "msgspec" }, { name = "pyyaml" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/84/74/78546fd421ebdfba54f40a27d3b719788c07d55168709e7a059171acfdcc/lightkube-0.16.2.tar.gz", hash = "sha256:f6807fe72cee1a82788f0e066b5b2ef28be32756eded68421a785401c39236f1", size = 44898, upload-time = "2024-12-29T17:32:26.611Z" } +sdist = { url = "https://files.pythonhosted.org/packages/c8/f7/5d244d5964f9fce76600eedb8abb5aa4c8db76184f70e63334fd4c7a6480/lightkube-1.0.1.tar.gz", hash = "sha256:5f1577487be7d44c847f88a656574154e8f5dec0045d959b8328b88d7adb518a", size = 38783, upload-time = "2026-08-12T11:13:58.854Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/61/14/3e083d9abe07e758134c1f288fc0dfc3aa82f123e0752e494132fb3b41a1/lightkube-0.16.2-py3-none-any.whl", hash = "sha256:61a1477eba728207f511febc27165d22e5cae34ff8cb342ae35360c969d02a59", size = 38339, upload-time = "2024-12-29T17:32:29.947Z" }, + { url = "https://files.pythonhosted.org/packages/d8/a0/9cf2061cb19c3c732408a5d28bca61774fefdb7ea67105ff2bed4b01defa/lightkube-1.0.1-py3-none-any.whl", hash = "sha256:094a6ae6a2fa895189450865915964d03336d1561fc9fc6f48786a075073c782", size = 49276, upload-time = "2026-08-12T11:14:01.806Z" }, ] [[package]] @@ -864,19 +892,51 @@ wheels = [ ] [[package]] -name = "nodejs-wheel-binaries" -version = "22.14.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d7/c7/4fd3871d2b7fd5122216245e273201ab98eda92bbd6fe9ad04846b758c56/nodejs_wheel_binaries-22.14.0.tar.gz", hash = "sha256:c1dc43713598c7310d53795c764beead861b8c5021fe4b1366cb912ce1a4c8bf", size = 8055, upload-time = "2025-02-11T18:15:17.714Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/61/b6/66ef4ef75ea7389ea788f2d5505bf9a8e5c3806d56c7a90cf46a6942f1cf/nodejs_wheel_binaries-22.14.0-py2.py3-none-macosx_11_0_arm64.whl", hash = "sha256:d8ab8690516a3e98458041286e3f0d6458de176d15c14f205c3ea2972131420d", size = 50326597, upload-time = "2025-02-11T18:14:18.467Z" }, - { url = "https://files.pythonhosted.org/packages/7d/78/023d91a293ba73572a643bc89d11620d189f35f205a309dd8296aa45e69a/nodejs_wheel_binaries-22.14.0-py2.py3-none-macosx_11_0_x86_64.whl", hash = "sha256:b2f200f23b3610bdbee01cf136279e005ffdf8ee74557aa46c0940a7867956f6", size = 51158258, upload-time = "2025-02-11T18:14:25.693Z" }, - { url = "https://files.pythonhosted.org/packages/af/86/324f6342c79e5034a13319b02ba9ed1f4ac8813af567d223c9a9e56cd338/nodejs_wheel_binaries-22.14.0-py2.py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d0877832abd7a9c75c8c5caafa37f986c9341ee025043c2771213d70c4c1defa", size = 57180264, upload-time = "2025-02-11T18:14:34.123Z" }, - { url = "https://files.pythonhosted.org/packages/6d/9f/42bdaab26137e31732bff00147b9aca2185d475b5752b57a443e6c7ba93f/nodejs_wheel_binaries-22.14.0-py2.py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8fded5a70a8a55c2135e67bd580d8b7f2e94fcbafcc679b6a2d5b92f88373d69", size = 57693251, upload-time = "2025-02-11T18:14:42.071Z" }, - { url = "https://files.pythonhosted.org/packages/ab/d7/94f8f269aa86cf35f9ed2b70d09aca48dc971fb5656fdc4a3b69364b189f/nodejs_wheel_binaries-22.14.0-py2.py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:c1ade6f3ece458b40c02e89c91d5103792a9f18aaad5026da533eb0dcb87090e", size = 58841717, upload-time = "2025-02-11T18:14:49.971Z" }, - { url = "https://files.pythonhosted.org/packages/2d/a0/43b7316eaf22b4ee9bfb897ee36c724efceac7b89d7d1bedca28057b7be1/nodejs_wheel_binaries-22.14.0-py2.py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:34fa5ed4cf3f65cbfbe9b45c407ffc2fc7d97a06cd8993e6162191ff81f29f48", size = 59808791, upload-time = "2025-02-11T18:14:59.428Z" }, - { url = "https://files.pythonhosted.org/packages/10/0a/814491f751a25136e37de68a2728c9a9e3c1d20494aba5ff3c230d5f9c2d/nodejs_wheel_binaries-22.14.0-py2.py3-none-win_amd64.whl", hash = "sha256:ca7023276327455988b81390fa6bbfa5191c1da7fc45bc57c7abc281ba9967e9", size = 40478921, upload-time = "2025-02-11T18:15:07.3Z" }, - { url = "https://files.pythonhosted.org/packages/f4/5c/cab444afaa387dceac8debb817b52fd00596efcd2d54506c27311c6fe6a8/nodejs_wheel_binaries-22.14.0-py2.py3-none-win_arm64.whl", hash = "sha256:fd59c8e9a202221e316febe1624a1ae3b42775b7fb27737bf12ec79565983eaf", size = 36206637, upload-time = "2025-02-11T18:15:13.39Z" }, +name = "msgspec" +version = "0.21.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e3/60/f79b9b013a16fa3a58350c9295ddc6789f2e335f36ea61ed10a21b215364/msgspec-0.21.1.tar.gz", hash = "sha256:2313508e394b0d208f8f56892ca9b2799e2561329de9763b19619595a6c0f72c", size = 319193, upload-time = "2026-04-12T21:44:50.394Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ba/7f/bbc4e74cd33d316b75541149e4d35b163b63bce066530ae185a2ec3b5bfc/msgspec-0.21.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:b504b6e7f7a22a24b27232b73034421692147865162daaec9f3bf62439007c87", size = 193131, upload-time = "2026-04-12T21:43:56.094Z" }, + { url = "https://files.pythonhosted.org/packages/c1/60/504886af1aaf854112663b842d5eea9a15d9588f9bf7d0d2df736424b84d/msgspec-0.21.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4692b7c1609155708c4418f88e92f63c13fdf08aa095c84bae82bad75b53389b", size = 186597, upload-time = "2026-04-12T21:43:57.242Z" }, + { url = "https://files.pythonhosted.org/packages/fa/54/d24ddeaa65b5278c9e67f48ce3c17a9831e8f3722f3c8322ee120aca22ef/msgspec-0.21.1-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d3124010b3815451494c85ff345e693cb9fe5889cfcbbef39ed8622e0e72319c", size = 215158, upload-time = "2026-04-12T21:43:58.442Z" }, + { url = "https://files.pythonhosted.org/packages/9f/75/bb79c8b89a93ae23cd33c0d802373f16feaf9633f05d8af77091350dda0a/msgspec-0.21.1-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6badc03b9725352219cca017bfe71c61f2fbd0fb5982b410ac17c97c213deb30", size = 219856, upload-time = "2026-04-12T21:44:00.015Z" }, + { url = "https://files.pythonhosted.org/packages/b4/9c/c5ca26b46f0ebbd3a6683695ef89396712cb9e4199fd1f0bc1dd968216b1/msgspec-0.21.1-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:5d2d4116ebe3035a78d9ec76e99a9d64e5fa6d44fe61a9c5de7fd1acf54bcc69", size = 220314, upload-time = "2026-04-12T21:44:01.548Z" }, + { url = "https://files.pythonhosted.org/packages/c8/31/645a351c4285dce40ed6755c3dcc0aa648e26dacb20a98018fe2cce5e87b/msgspec-0.21.1-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:0d1009f6715f5bff3b54d4ff5c7428ad96197e0534e1645b8e9b955890c84664", size = 223215, upload-time = "2026-04-12T21:44:02.884Z" }, + { url = "https://files.pythonhosted.org/packages/09/af/8bf15736a6dd3cb4f90c5467f6dc39197d2daaf10754490cdc0aa17b7312/msgspec-0.21.1-cp311-cp311-win_amd64.whl", hash = "sha256:c6faffe5bb644ec884052679af4dfd776d4b5ca90e4a7ec7e7e319e4e6b93a6e", size = 188554, upload-time = "2026-04-12T21:44:04.151Z" }, + { url = "https://files.pythonhosted.org/packages/ef/29/cc7db3a165b62d16e64a83f82eccb79655055cb5bc1f60459a6f9d7c82f2/msgspec-0.21.1-cp311-cp311-win_arm64.whl", hash = "sha256:ee9e3f11fa94603f7d673bf795cfa31b549c4a2c723bc39b45beb1e7f5a3fb99", size = 174517, upload-time = "2026-04-12T21:44:05.66Z" }, + { url = "https://files.pythonhosted.org/packages/6e/cf/317224852c00248c620a9bcf4b26e2e4ab8afd752f18d2a6ef73ebd423b6/msgspec-0.21.1-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d4248cf0b6129b7d230eacd493c17cc2d4f3989f3bb7f633a928a85b7dcfa251", size = 196188, upload-time = "2026-04-12T21:44:07.181Z" }, + { url = "https://files.pythonhosted.org/packages/6d/81/074612945c0666078f7366f40000013de9f6ba687491d450df699bceebc9/msgspec-0.21.1-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:5102c7e9b3acff82178449b85006d96310e690291bb1ea0142f1b24bcb8aabcb", size = 188473, upload-time = "2026-04-12T21:44:08.736Z" }, + { url = "https://files.pythonhosted.org/packages/8a/37/655101799590bcc5fddb2bd3fe0e6194e816c2d1da7c361725f5eb89a910/msgspec-0.21.1-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:846758412e9518252b2ac9bffd6f0e54d9ff614f5f9488df7749f81ff5c80920", size = 218871, upload-time = "2026-04-12T21:44:09.917Z" }, + { url = "https://files.pythonhosted.org/packages/b5/d1/d4cd9fe89c7d400d7a18f86ccc94daa3f0927f53558846fcb60791dce5d6/msgspec-0.21.1-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:21995e74b5c598c2e004110ad66ec7f1b8c20bf2bcf3b2de8fd9a3094422d3ff", size = 225025, upload-time = "2026-04-12T21:44:11.191Z" }, + { url = "https://files.pythonhosted.org/packages/24/bf/e20549e602b9edccadeeff98760345a416f9cce846a657e8b18e3396b212/msgspec-0.21.1-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:6129f0cca52992e898fd5344187f7c8127b63d810b2fd73e36fca73b4c6475ee", size = 222672, upload-time = "2026-04-12T21:44:12.481Z" }, + { url = "https://files.pythonhosted.org/packages/b4/68/04d7a8f0f786545cf9b8c280c57aa6befb5977af6e884b8b54191cbe44b3/msgspec-0.21.1-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:ef3ec2296248d1f8b9231acb051b6d471dfde8f21819e86c9adaaa9f42918521", size = 227303, upload-time = "2026-04-12T21:44:13.709Z" }, + { url = "https://files.pythonhosted.org/packages/cc/4d/619866af2840875be408047bf9e70ceafbae6ab50660de7134ed1b25eb86/msgspec-0.21.1-cp312-cp312-win_amd64.whl", hash = "sha256:d4ab834a054c6f0cbeef6df9e7e1b33d5f1bc7b86dea1d2fd7cad003873e783d", size = 190017, upload-time = "2026-04-12T21:44:14.977Z" }, + { url = "https://files.pythonhosted.org/packages/5e/2e/a8f9eca8fd00e097d7a9e99ba8a4685db994494448e3d4f0b7f6e9a3c0f7/msgspec-0.21.1-cp312-cp312-win_arm64.whl", hash = "sha256:628aaa35c74950a8c59da330d7e98917e1c7188f983745782027748ee4ca573e", size = 175345, upload-time = "2026-04-12T21:44:16.431Z" }, + { url = "https://files.pythonhosted.org/packages/7e/74/f11ede02839b19ff459f88e3145df5d711626ca84da4e23520cebf819367/msgspec-0.21.1-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:764173717a01743f007e9f74520ed281f24672c604514f7d76c1c3a10e8edb66", size = 196176, upload-time = "2026-04-12T21:44:17.613Z" }, + { url = "https://files.pythonhosted.org/packages/bb/40/4476c1bd341418a046c4955aff632ec769315d1e3cb94e6acf86d461f9ed/msgspec-0.21.1-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:344c7cd0eaed1fb81d7959f99100ef71ec9b536881a376f11b9a6c4803365697", size = 188524, upload-time = "2026-04-12T21:44:18.815Z" }, + { url = "https://files.pythonhosted.org/packages/ca/d9/9e9d7d7e5061b47540d03d640fab9b3965ba7ae49c1b2154861c8f007518/msgspec-0.21.1-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:48943e278b3854c2f89f955ddc6f9f430d3f0784b16e47d10604ee0463cd21f5", size = 218880, upload-time = "2026-04-12T21:44:20.028Z" }, + { url = "https://files.pythonhosted.org/packages/74/66/2bb344f34abb4b57e60c7c9c761994e0417b9718ec1460bf00c296f2a7ea/msgspec-0.21.1-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a9aa659ebb0101b1cbc31461212b87e341d961f0ab0772aaf068a99e001ec4aa", size = 225050, upload-time = "2026-04-12T21:44:21.577Z" }, + { url = "https://files.pythonhosted.org/packages/1a/84/7c1e412f76092277bf760cef12b7979d03314d259ab5b5cafde5d0c1722d/msgspec-0.21.1-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7b27d1a8ead2b6f5b0c4f2d07b8be1ccfcc041c8a0e704781edebe3ae13c484", size = 222713, upload-time = "2026-04-12T21:44:22.83Z" }, + { url = "https://files.pythonhosted.org/packages/4e/27/0bba04b2b4ef05f3d068429410bc71d2cea925f1596a8f41152cccd5edb8/msgspec-0.21.1-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:38fe93e86b61328fe544cb7fd871fad5a27c8734bfda90f65e5dbe288ae50f61", size = 227259, upload-time = "2026-04-12T21:44:24.11Z" }, + { url = "https://files.pythonhosted.org/packages/b0/2d/09574b0eea02fed2c2c1383dbaae2c7f79dc16dcd6487a886000afb5d7c4/msgspec-0.21.1-cp313-cp313-win_amd64.whl", hash = "sha256:8bc666331c35fcce05a7cd2d6221adbe0f6058f8e750711413d22793c080ac6a", size = 189857, upload-time = "2026-04-12T21:44:25.359Z" }, + { url = "https://files.pythonhosted.org/packages/46/34/105b1576ad182879914f0c821f17ee1d13abb165cb060448f96fe2aff078/msgspec-0.21.1-cp313-cp313-win_arm64.whl", hash = "sha256:42bb1241e0750c1a4346f2aa84db26c5ffd99a4eb3a954927d9f149ff2f42898", size = 175403, upload-time = "2026-04-12T21:44:26.608Z" }, + { url = "https://files.pythonhosted.org/packages/5a/ad/86954e987d1d6a5c579e2c2e7832b65e0fff194179fdac4f581536086024/msgspec-0.21.1-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:fab48eb45fdbfbdb2c0edfec00ffc53b6b6085beefc6b50b61e01659f9f8757f", size = 196261, upload-time = "2026-04-12T21:44:27.807Z" }, + { url = "https://files.pythonhosted.org/packages/d1/a1/c5e46c3e42b866199365e35d11dddfd1fbd8bba4fdb3c52f965b1607ce94/msgspec-0.21.1-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:3cb779ea0c35bc807ff941d415875c1f69ca0be91a2e907ab99a171811d86a9a", size = 188729, upload-time = "2026-04-12T21:44:28.99Z" }, + { url = "https://files.pythonhosted.org/packages/85/7d/1e29a319d678d6cb962ae5bdf32a6858ebdf38f73bc654c0e9c742a0c2c8/msgspec-0.21.1-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:68604db36b3b4dd9bf160e436e12798a4738848144cea1aca1cb984011eb160f", size = 219866, upload-time = "2026-04-12T21:44:31.104Z" }, + { url = "https://files.pythonhosted.org/packages/25/1f/cca084ca2572810fff12ea9dbdcbe39eac048f40daf4a9077b49fcbe8cee/msgspec-0.21.1-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:3d6b9dc50948eaf65df54d2fd0ff66e6d8c32f116037209ee861810eb9b676cb", size = 224993, upload-time = "2026-04-12T21:44:32.649Z" }, + { url = "https://files.pythonhosted.org/packages/71/94/d2120fc9d419a89a3a7c13e5b7078798c4b392a96a02a6e2b3ce43a8766c/msgspec-0.21.1-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:52c5e21930942302394429c5a582ce7e6b62c7f983b3760834c2ce107e0dd6df", size = 223535, upload-time = "2026-04-12T21:44:33.839Z" }, + { url = "https://files.pythonhosted.org/packages/75/17/42418b66a3ad972a89bab73dd78b79cc6282bb488a25e73c853cee7443b9/msgspec-0.21.1-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:abbb39d65681fa24ed394e01af3d59d869068324f900c61d06062b7fb9980f2f", size = 227222, upload-time = "2026-04-12T21:44:35.093Z" }, + { url = "https://files.pythonhosted.org/packages/c4/33/265c894268cca88ff67b144ca2b4c522fc8b9a6f1966a3640c70516e78e1/msgspec-0.21.1-cp314-cp314-win_amd64.whl", hash = "sha256:5666b1b560b97b6ec2eb3fca8a502298ebac56e13bbca1f88523538ce83d01ea", size = 193810, upload-time = "2026-04-12T21:44:36.612Z" }, + { url = "https://files.pythonhosted.org/packages/3b/8f/a6d35f25bf1fc63c492fdd88fdce01ba0875ead48c2b91f90f33653b4131/msgspec-0.21.1-cp314-cp314-win_arm64.whl", hash = "sha256:d8b8578e4c83b14ceea4cef0d0b747e31d9330fe4b03b2b2ad4063866a178f93", size = 179125, upload-time = "2026-04-12T21:44:38.198Z" }, + { url = "https://files.pythonhosted.org/packages/c6/39/74839641e64b99d87da55af0fc472854d42b46e2183b9e2a67fe1bb2a512/msgspec-0.21.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:15f523d51c00ebad412213bfe9f06f0a50ec2b93e0c19e824a2d267cabb48ea2", size = 200171, upload-time = "2026-04-12T21:44:39.414Z" }, + { url = "https://files.pythonhosted.org/packages/70/9b/ce0cca6d2d87fcd4b6ff97600790494e64f26a2c55d61507cd2755c16193/msgspec-0.21.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:4e47390360583ba3d5c6cb44cf0a9f61b0a06a899d3c2c00627cedebb2e2884b", size = 192879, upload-time = "2026-04-12T21:44:40.882Z" }, + { url = "https://files.pythonhosted.org/packages/a7/08/673a7bb05e5702dc787ddd3011195b509f9867927970da59052211929987/msgspec-0.21.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f60800e6299b798142dc40b0644da77ceac5ea0568be58228417eae14135c847", size = 226281, upload-time = "2026-04-12T21:44:42.181Z" }, + { url = "https://files.pythonhosted.org/packages/7d/45/86508cf57283e9070b3c447e3ab25b792a7a0855a3ea4e0c6d111ac34c97/msgspec-0.21.1-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5f8e9dfcd98419cf7568808470c4317a3fb30bef0e3715b568730a2b272a20d7", size = 229863, upload-time = "2026-04-12T21:44:43.442Z" }, + { url = "https://files.pythonhosted.org/packages/2c/62/e7c9367cd08d590559faacd711edbae36840342843e669440363f33c7d36/msgspec-0.21.1-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:92d89dfad13bd1ea640dc3e37e724ed380da1030b272bdf5ecafb983c3ad7c75", size = 230445, upload-time = "2026-04-12T21:44:44.806Z" }, + { url = "https://files.pythonhosted.org/packages/42/b4/c0f54632103846b658a10930025f4de41c8724b5e4805a5f3b395586cb7e/msgspec-0.21.1-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:0d03867786e5d7ba25d666df4b11320c27170f4aeafcb8e3a8b0a50a4fb742ca", size = 231822, upload-time = "2026-04-12T21:44:46.343Z" }, + { url = "https://files.pythonhosted.org/packages/ea/1d/0d85cc79d0ccf5508e9c846cc66552a6a16bf92abd1dbd8362617f7b35cd/msgspec-0.21.1-cp314-cp314t-win_amd64.whl", hash = "sha256:740fbf1c9d59992ca3537d6fbe9ebbf9eaf726a65fbf31448e0ecbc710697a63", size = 206650, upload-time = "2026-04-12T21:44:47.601Z" }, + { url = "https://files.pythonhosted.org/packages/90/91/56c5d560f20e6c20e9e4f55bd0e458f7f162aa689ee350346c04c48eac0b/msgspec-0.21.1-cp314-cp314t-win_arm64.whl", hash = "sha256:0d2cc73df6058d811a126ac3a8ad63a4dfa210c82f9cf5a004802eaf4712de90", size = 183149, upload-time = "2026-04-12T21:44:48.833Z" }, ] [[package]] @@ -1784,6 +1844,31 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/19/97/56608b2249fe206a67cd573bc93cd9896e1efb9e98bce9c163bcdc704b88/truststore-0.10.4-py3-none-any.whl", hash = "sha256:adaeaecf1cbb5f4de3b1959b42d41f6fab57b2b1666adb59e89cb0b53361d981", size = 18660, upload-time = "2025-08-12T18:49:01.46Z" }, ] +[[package]] +name = "ty" +version = "0.0.71" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/dd/e2/f6e716371b5913a31190db1ad250ac2b5c68b3ca2db71afeba3f98f5fe50/ty-0.0.71.tar.gz", hash = "sha256:c2a24f2745294946c27cef8cc012b84fb2db5405ecefddbe845be4162833da01", size = 6624721, upload-time = "2026-08-13T00:39:31.035Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/4a/e4/8d6d17827c5335d0efe54241fb54fed3cb6ca2d2eca62f3f2382be196b91/ty-0.0.71-py3-none-linux_armv6l.whl", hash = "sha256:a309c9a35e69f45d7053e9205c7fe2295fac09e07e3a2fdb791524f30440a9cc", size = 12576435, upload-time = "2026-08-13T00:38:50.617Z" }, + { url = "https://files.pythonhosted.org/packages/d5/cb/d4c48832ee3d162abc6c834ba62242ec27630cb93014a0e1be82e86c3ee3/ty-0.0.71-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:2d42e9ae4b754ce1f34dd1b545f1cdcfc8e704d7460b584c898be156f048828f", size = 12177806, upload-time = "2026-08-13T00:38:53.068Z" }, + { url = "https://files.pythonhosted.org/packages/f0/97/e04782c9eaa1a0b634830f61b0e18cd1b3415332143d45a28882802c8ea1/ty-0.0.71-py3-none-macosx_11_0_arm64.whl", hash = "sha256:4d0b1f2002adc03f3a53aeb70b5cafcea634bb48726d82a307b0f15580d2f74b", size = 12015265, upload-time = "2026-08-13T00:38:55.209Z" }, + { url = "https://files.pythonhosted.org/packages/4f/5c/d716b9049c11a7b85b3b74ec3547d2dbab9a261347a6558420dcae37083d/ty-0.0.71-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:165e6086363f5c149ae4acacfbc36eea0093552a60f4153ef48321e4a3a15c4c", size = 12119608, upload-time = "2026-08-13T00:38:57.336Z" }, + { url = "https://files.pythonhosted.org/packages/b8/78/560ce2d874467d50605b7783e19e45b571fea7a89f664bd0ccdf252adf8a/ty-0.0.71-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:067e16f80855afbda024e7ff6fa5ed3ada5290c403badc63800f0534bd617c04", size = 12353762, upload-time = "2026-08-13T00:38:59.729Z" }, + { url = "https://files.pythonhosted.org/packages/a3/7b/f6a22c0bf2c0dbfe20b7ce90b51bc09efa9a9e245f1c35e160e39ed5dea9/ty-0.0.71-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:416149a550bcb678e619b4e2cd1cca9066d28edc52df76ad9d3640b36e6b5bf1", size = 13088120, upload-time = "2026-08-13T00:39:02.34Z" }, + { url = "https://files.pythonhosted.org/packages/a3/95/6f5382781f2e4fa933296d303376c61b8b3475d58ed60125c54de665fd21/ty-0.0.71-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:39e04c41e6d0e74f73cf8b3247d4dde3642ec38aeda7f4674110155b3da416a5", size = 13545140, upload-time = "2026-08-13T00:39:04.655Z" }, + { url = "https://files.pythonhosted.org/packages/6d/e7/8f0ad7b6c4804f8682e08fb161eaf710dd1765006b1b6df7c657b9707c95/ty-0.0.71-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7fb696bdea4a3554a0d0a7bbb36e4c5f508acb2bbad435e91c7fc812c1de6bfb", size = 13266730, upload-time = "2026-08-13T00:39:06.858Z" }, + { url = "https://files.pythonhosted.org/packages/ac/06/b83158fdf1473c2486fba0de337a963e9cc21317ccaa3e54ab003d419737/ty-0.0.71-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e3ec4ca9d4ba3e11ecc282c3d50d0730a2e181da7142734219d9f213fcbaaa00", size = 12673786, upload-time = "2026-08-13T00:39:09.281Z" }, + { url = "https://files.pythonhosted.org/packages/7c/9a/10f37c0550277722ac1d2c8096e492e0f3fc1aa2e587082439dd066fdb8d/ty-0.0.71-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:48a231253b32639ff4b19f74e476bacdba0150182603011d3792d1f1a335b932", size = 13140294, upload-time = "2026-08-13T00:39:11.659Z" }, + { url = "https://files.pythonhosted.org/packages/3b/e6/5710de1da7eb8aa755d289aa25316691e545b72b4ee2ab14172612eec1c9/ty-0.0.71-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:1a082f57d1fcbe209afdcacff37870defd4cea15ce69e2c6c652a9208462722f", size = 12171216, upload-time = "2026-08-13T00:39:14.382Z" }, + { url = "https://files.pythonhosted.org/packages/80/c5/8d9113e3cf0d4c6c0a9c9e088cee93e41facb278026bea6f6e12533b09dd/ty-0.0.71-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:cbe1c962f6c9e8964180cd171cc6ad35d687f74d51c07f60b670d3f1c5d58ffe", size = 12360626, upload-time = "2026-08-13T00:39:16.747Z" }, + { url = "https://files.pythonhosted.org/packages/7d/a0/0e167507c4c863814d3ea7602bde958baefd03346bd38bae3a430dff1ea9/ty-0.0.71-py3-none-musllinux_1_2_i686.whl", hash = "sha256:25f641b988916b3975e50b2a59cbc5179f2a466d181f207f3032e1e6bc617a88", size = 12637309, upload-time = "2026-08-13T00:39:19.14Z" }, + { url = "https://files.pythonhosted.org/packages/1d/c6/ff6719b91e4916985e9a92f9bddb10d9fe3cb3bdf5abf0f9019a67aebe21/ty-0.0.71-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:c5fe916b6e5b152ef4f583324e1efd770ac3316894776dc1b57c354cb767b8ee", size = 12937996, upload-time = "2026-08-13T00:39:21.533Z" }, + { url = "https://files.pythonhosted.org/packages/ee/3e/21a0873da8f1ece28e166fbbaf696cd48c55fd7cd203dba0266a1fe05ceb/ty-0.0.71-py3-none-win32.whl", hash = "sha256:a273fe0dcc453e94cf2e1955076efec8b739e6e1a890862de29d3c5a1c9ddaff", size = 11953321, upload-time = "2026-08-13T00:39:23.804Z" }, + { url = "https://files.pythonhosted.org/packages/69/fa/ce6614c748f7abfc546d12983d4bad1085116b6458b8c84d9372eb713f08/ty-0.0.71-py3-none-win_amd64.whl", hash = "sha256:65f5f980551ed79f68a0f6c0f2fb71b39a8d54ed0625d2529b01f6c919db72c5", size = 12570891, upload-time = "2026-08-13T00:39:26.346Z" }, + { url = "https://files.pythonhosted.org/packages/77/7f/0fb022535c66fd96e7dd2a1f9c14e3a0e39544a4c3f35a451e8835562730/ty-0.0.71-py3-none-win_arm64.whl", hash = "sha256:6d5552078b9934d359bd5f381dbcb160f1fc5addfca59a960021adca38a73741", size = 12338716, upload-time = "2026-08-13T00:39:28.987Z" }, +] + [[package]] name = "typepy" version = "1.3.4" @@ -1884,6 +1969,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/33/e8/e40370e6d74ddba47f002a32919d91310d6074130fe4e17dabcafc15cbf1/watchdog-6.0.0-py3-none-win_ia64.whl", hash = "sha256:a1914259fa9e1454315171103c6a30961236f508b9b623eae470268bbcc6a22f", size = 79067, upload-time = "2024-11-01T14:07:11.845Z" }, ] +[[package]] +name = "wsproto" +version = "1.3.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "h11" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c7/79/12135bdf8b9c9367b8701c2c19a14c913c120b882d50b014ca0d38083c2c/wsproto-1.3.2.tar.gz", hash = "sha256:b86885dcf294e15204919950f666e06ffc6c7c114ca900b060d6e16293528294", size = 50116, upload-time = "2025-11-20T18:18:01.871Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a4/f5/10b68b7b1544245097b2a1b8238f66f2fc6dcaeb24ba5d917f52bd2eed4f/wsproto-1.3.2-py3-none-any.whl", hash = "sha256:61eea322cdf56e8cc904bd3ad7573359a242ba65688716b0710a5eb12beab584", size = 24405, upload-time = "2025-11-20T18:18:00.454Z" }, +] + [[package]] name = "zipp" version = "3.21.0" From 14da254018496a91f20a1c033f772f70dcd5d5af Mon Sep 17 00:00:00 2001 From: Salomon Popp Date: Thu, 13 Aug 2026 16:55:56 +0200 Subject: [PATCH 2/3] ci: add ty step --- .github/pyright-matcher.json | 18 ------------------ .github/workflows/ci.yaml | 8 ++------ 2 files changed, 2 insertions(+), 24 deletions(-) delete mode 100644 .github/pyright-matcher.json diff --git a/.github/pyright-matcher.json b/.github/pyright-matcher.json deleted file mode 100644 index aa961af6a..000000000 --- a/.github/pyright-matcher.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "problemMatcher": [ - { - "owner": "pyright", - "pattern": [ - { - "regexp": "^\\s\\s(\\S*\\.py):(\\d+):(\\d+)\\s-\\s(error|warning|information):\\s([\\s\\S]+?)\\s\\(([\\s\\S]+?)(?=(?:\\)|\\d+ errors,))", - "file": 1, - "line": 2, - "column": 3, - "severity": 4, - "message": 5, - "code": 6 - } - ] - } - ] -} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2917f1429..6c819fb18 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -43,13 +43,9 @@ jobs: run: | uv run --frozen ruff check . --config pyproject.toml --no-fix ${{ matrix.format-for-github && '--output-format=github' }} - - name: Typing (basedpyright) + - name: Typing (ty) run: | - if [[ "${{ matrix.format-for-github }}" == "true" ]] - then - echo "::add-matcher::.github/pyright-matcher.json" - fi; - uv run --frozen basedpyright + uv run --frozen ty check ${{ matrix.format-for-github && '--output-format=github' }} format: name: Format From 8cb896e4af7fa752a5dc438c56a0ef401129df74 Mon Sep 17 00:00:00 2001 From: Salomon Popp Date: Mon, 17 Aug 2026 12:31:35 +0200 Subject: [PATCH 3/3] chore(dev): update ty --- pyproject.toml | 2 +- uv.lock | 44 ++++++++++++++++++++++---------------------- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cd2bca0d9..dcd3233ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,7 +52,7 @@ dev = [ "pytest-snapshot>=0.9.0", "pytest-timeout>=2.3.1", "ruff>=0.16.0", - "ty>=0.0.71", + "ty>=0.0.72", ] docs = [ "mdx-truly-sane-lists>=1.3", diff --git a/uv.lock b/uv.lock index 3efcf73fe..1c8dc5f08 100644 --- a/uv.lock +++ b/uv.lock @@ -553,7 +553,7 @@ dev = [ { name = "pytest-snapshot", specifier = ">=0.9.0" }, { name = "pytest-timeout", specifier = ">=2.3.1" }, { name = "ruff", specifier = ">=0.16.0" }, - { name = "ty", specifier = ">=0.0.71" }, + { name = "ty", specifier = ">=0.0.72" }, ] docs = [ { name = "mdx-truly-sane-lists", specifier = ">=1.3" }, @@ -1846,27 +1846,27 @@ wheels = [ [[package]] name = "ty" -version = "0.0.71" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/dd/e2/f6e716371b5913a31190db1ad250ac2b5c68b3ca2db71afeba3f98f5fe50/ty-0.0.71.tar.gz", hash = "sha256:c2a24f2745294946c27cef8cc012b84fb2db5405ecefddbe845be4162833da01", size = 6624721, upload-time = "2026-08-13T00:39:31.035Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/4a/e4/8d6d17827c5335d0efe54241fb54fed3cb6ca2d2eca62f3f2382be196b91/ty-0.0.71-py3-none-linux_armv6l.whl", hash = "sha256:a309c9a35e69f45d7053e9205c7fe2295fac09e07e3a2fdb791524f30440a9cc", size = 12576435, upload-time = "2026-08-13T00:38:50.617Z" }, - { url = "https://files.pythonhosted.org/packages/d5/cb/d4c48832ee3d162abc6c834ba62242ec27630cb93014a0e1be82e86c3ee3/ty-0.0.71-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:2d42e9ae4b754ce1f34dd1b545f1cdcfc8e704d7460b584c898be156f048828f", size = 12177806, upload-time = "2026-08-13T00:38:53.068Z" }, - { url = "https://files.pythonhosted.org/packages/f0/97/e04782c9eaa1a0b634830f61b0e18cd1b3415332143d45a28882802c8ea1/ty-0.0.71-py3-none-macosx_11_0_arm64.whl", hash = "sha256:4d0b1f2002adc03f3a53aeb70b5cafcea634bb48726d82a307b0f15580d2f74b", size = 12015265, upload-time = "2026-08-13T00:38:55.209Z" }, - { url = "https://files.pythonhosted.org/packages/4f/5c/d716b9049c11a7b85b3b74ec3547d2dbab9a261347a6558420dcae37083d/ty-0.0.71-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:165e6086363f5c149ae4acacfbc36eea0093552a60f4153ef48321e4a3a15c4c", size = 12119608, upload-time = "2026-08-13T00:38:57.336Z" }, - { url = "https://files.pythonhosted.org/packages/b8/78/560ce2d874467d50605b7783e19e45b571fea7a89f664bd0ccdf252adf8a/ty-0.0.71-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:067e16f80855afbda024e7ff6fa5ed3ada5290c403badc63800f0534bd617c04", size = 12353762, upload-time = "2026-08-13T00:38:59.729Z" }, - { url = "https://files.pythonhosted.org/packages/a3/7b/f6a22c0bf2c0dbfe20b7ce90b51bc09efa9a9e245f1c35e160e39ed5dea9/ty-0.0.71-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:416149a550bcb678e619b4e2cd1cca9066d28edc52df76ad9d3640b36e6b5bf1", size = 13088120, upload-time = "2026-08-13T00:39:02.34Z" }, - { url = "https://files.pythonhosted.org/packages/a3/95/6f5382781f2e4fa933296d303376c61b8b3475d58ed60125c54de665fd21/ty-0.0.71-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:39e04c41e6d0e74f73cf8b3247d4dde3642ec38aeda7f4674110155b3da416a5", size = 13545140, upload-time = "2026-08-13T00:39:04.655Z" }, - { url = "https://files.pythonhosted.org/packages/6d/e7/8f0ad7b6c4804f8682e08fb161eaf710dd1765006b1b6df7c657b9707c95/ty-0.0.71-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:7fb696bdea4a3554a0d0a7bbb36e4c5f508acb2bbad435e91c7fc812c1de6bfb", size = 13266730, upload-time = "2026-08-13T00:39:06.858Z" }, - { url = "https://files.pythonhosted.org/packages/ac/06/b83158fdf1473c2486fba0de337a963e9cc21317ccaa3e54ab003d419737/ty-0.0.71-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e3ec4ca9d4ba3e11ecc282c3d50d0730a2e181da7142734219d9f213fcbaaa00", size = 12673786, upload-time = "2026-08-13T00:39:09.281Z" }, - { url = "https://files.pythonhosted.org/packages/7c/9a/10f37c0550277722ac1d2c8096e492e0f3fc1aa2e587082439dd066fdb8d/ty-0.0.71-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:48a231253b32639ff4b19f74e476bacdba0150182603011d3792d1f1a335b932", size = 13140294, upload-time = "2026-08-13T00:39:11.659Z" }, - { url = "https://files.pythonhosted.org/packages/3b/e6/5710de1da7eb8aa755d289aa25316691e545b72b4ee2ab14172612eec1c9/ty-0.0.71-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:1a082f57d1fcbe209afdcacff37870defd4cea15ce69e2c6c652a9208462722f", size = 12171216, upload-time = "2026-08-13T00:39:14.382Z" }, - { url = "https://files.pythonhosted.org/packages/80/c5/8d9113e3cf0d4c6c0a9c9e088cee93e41facb278026bea6f6e12533b09dd/ty-0.0.71-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:cbe1c962f6c9e8964180cd171cc6ad35d687f74d51c07f60b670d3f1c5d58ffe", size = 12360626, upload-time = "2026-08-13T00:39:16.747Z" }, - { url = "https://files.pythonhosted.org/packages/7d/a0/0e167507c4c863814d3ea7602bde958baefd03346bd38bae3a430dff1ea9/ty-0.0.71-py3-none-musllinux_1_2_i686.whl", hash = "sha256:25f641b988916b3975e50b2a59cbc5179f2a466d181f207f3032e1e6bc617a88", size = 12637309, upload-time = "2026-08-13T00:39:19.14Z" }, - { url = "https://files.pythonhosted.org/packages/1d/c6/ff6719b91e4916985e9a92f9bddb10d9fe3cb3bdf5abf0f9019a67aebe21/ty-0.0.71-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:c5fe916b6e5b152ef4f583324e1efd770ac3316894776dc1b57c354cb767b8ee", size = 12937996, upload-time = "2026-08-13T00:39:21.533Z" }, - { url = "https://files.pythonhosted.org/packages/ee/3e/21a0873da8f1ece28e166fbbaf696cd48c55fd7cd203dba0266a1fe05ceb/ty-0.0.71-py3-none-win32.whl", hash = "sha256:a273fe0dcc453e94cf2e1955076efec8b739e6e1a890862de29d3c5a1c9ddaff", size = 11953321, upload-time = "2026-08-13T00:39:23.804Z" }, - { url = "https://files.pythonhosted.org/packages/69/fa/ce6614c748f7abfc546d12983d4bad1085116b6458b8c84d9372eb713f08/ty-0.0.71-py3-none-win_amd64.whl", hash = "sha256:65f5f980551ed79f68a0f6c0f2fb71b39a8d54ed0625d2529b01f6c919db72c5", size = 12570891, upload-time = "2026-08-13T00:39:26.346Z" }, - { url = "https://files.pythonhosted.org/packages/77/7f/0fb022535c66fd96e7dd2a1f9c14e3a0e39544a4c3f35a451e8835562730/ty-0.0.71-py3-none-win_arm64.whl", hash = "sha256:6d5552078b9934d359bd5f381dbcb160f1fc5addfca59a960021adca38a73741", size = 12338716, upload-time = "2026-08-13T00:39:28.987Z" }, +version = "0.0.72" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d5/df/656e684bafb13c1d146e7d5b5f3e7978ca177232acc84998ff36427e9462/ty-0.0.72.tar.gz", hash = "sha256:ec2b8066b618df18cab4cb8e992f8da45d360332acb23fa34df7fa29cd1b9d3a", size = 6654939, upload-time = "2026-08-14T21:35:42.612Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e2/3b/f51461239a4e66565d4b362f97a3b55fe7fdba2e944068341f87c62f6743/ty-0.0.72-py3-none-linux_armv6l.whl", hash = "sha256:fda86db153ffd85ee52000cf175d6a3f1c0223772cf7c5b6f726200bf92c7b44", size = 12621989, upload-time = "2026-08-14T21:35:01.676Z" }, + { url = "https://files.pythonhosted.org/packages/ca/fb/79ddf683affc679ca856f3510b5640ec3a88a842ba5f654f5d4bc78f1786/ty-0.0.72-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:ceb944c612529b9023acfdc9cf4c0dcbb722549f9d17d46baecd1141baf01d7f", size = 12233910, upload-time = "2026-08-14T21:35:04.334Z" }, + { url = "https://files.pythonhosted.org/packages/5d/45/10562a0d84802158db8fa4ec46de54aa9fdcecdeeaabbfe3639ae7042b66/ty-0.0.72-py3-none-macosx_11_0_arm64.whl", hash = "sha256:108d76218333d6c092e5f1cebf8e9b06f25738613a0236a28e2dd47c936ee52c", size = 12084108, upload-time = "2026-08-14T21:35:06.686Z" }, + { url = "https://files.pythonhosted.org/packages/a1/dc/1fe1aef8d697e3509face271a5331700c7aa1d1e44a4b622707bdfa41d4b/ty-0.0.72-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f3943f186f741a2499a31053872169250c9264a9a49684920e48d8fcf4ef4f5", size = 12132640, upload-time = "2026-08-14T21:35:09.305Z" }, + { url = "https://files.pythonhosted.org/packages/14/46/41ceb265e96969487311a2014bd0e53abb4fbc1395efb2ebe411fcb4db62/ty-0.0.72-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:cf283c07dc3cc52ca48a3ad8ab100fb5aec3aebbd03ef6a12d5f910b8e596fc5", size = 12402489, upload-time = "2026-08-14T21:35:11.555Z" }, + { url = "https://files.pythonhosted.org/packages/2b/45/30bf43cb4fd505c5c2dd30fda27dde5f05208686cd21217adec77c954204/ty-0.0.72-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:95f3b6462c38f9f115d10cee21f47fedf715fcf2040daf36eef210359300bc7c", size = 13130835, upload-time = "2026-08-14T21:35:13.746Z" }, + { url = "https://files.pythonhosted.org/packages/31/2f/03bba754d2613f640df168335c41f83f41db150bb515839c60d80e3a7880/ty-0.0.72-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:30caf658feb8ffb250d9e9e47107657a78f5f3425c227df1664d8df2ebe38880", size = 13590392, upload-time = "2026-08-14T21:35:16.839Z" }, + { url = "https://files.pythonhosted.org/packages/04/c7/03c67f00e63005ec41585653dc3096064570b1e6273742baae2798cd242f/ty-0.0.72-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:27bdc012ddfbeec8948e4a6036c0dc39ac7cf2c8ec7c7d48dc7d2fd56d57b399", size = 13309629, upload-time = "2026-08-14T21:35:19.169Z" }, + { url = "https://files.pythonhosted.org/packages/c1/df/102d3b264eb7f2a58dd11952f229bb5150bb5668d176a6154976a6675981/ty-0.0.72-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:802c5970a77d7739e6f499921fbb6984fb7ad8a31d95e1ff42fd46f3642e4f3b", size = 12734028, upload-time = "2026-08-14T21:35:22.099Z" }, + { url = "https://files.pythonhosted.org/packages/61/85/d0737c8c54d0ba67366ddfb9f31d88edf0b02299e65923e6945ae60ebcb5/ty-0.0.72-py3-none-manylinux_2_31_riscv64.whl", hash = "sha256:47dce65114fdc615c68ca0edb393b433df0956447e4267df0e264137a789598d", size = 13174832, upload-time = "2026-08-14T21:35:24.71Z" }, + { url = "https://files.pythonhosted.org/packages/1e/31/497f5a96c36d9b586ab6afe0574986835c6fd5b835a89773d2bec4711b49/ty-0.0.72-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:325144fa07e2675d0faa337fcc864213c272a499eb0cfe5bde2fdc62282d27bc", size = 12215005, upload-time = "2026-08-14T21:35:26.892Z" }, + { url = "https://files.pythonhosted.org/packages/df/7d/46e65b17b4966c7cd0140f134380d33d8e84fe6efccd761533ce793dc502/ty-0.0.72-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:a5c9f15d0f58e43707d8848274be1821a0ef408eccb8aa7dda28a4a9eddf7640", size = 12421298, upload-time = "2026-08-14T21:35:29.301Z" }, + { url = "https://files.pythonhosted.org/packages/08/2a/12ada4ec17700b3cb1d4fd3bc3e5b1852df9e6885288429318cade87b3c1/ty-0.0.72-py3-none-musllinux_1_2_i686.whl", hash = "sha256:8ee508d64b381871529cc22c412b41071bf5e908b7aa5d66a38f3f6b2573a806", size = 12669242, upload-time = "2026-08-14T21:35:31.444Z" }, + { url = "https://files.pythonhosted.org/packages/1c/1a/4692536880790fb550ed6d44a6096778dc71bb112f2c6d615cebb01a57e5/ty-0.0.72-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:3699e2ec7921d44da79d6b089f7bf239b2cc53c4e45a5a38430adc34ee9e9a55", size = 12988199, upload-time = "2026-08-14T21:35:33.749Z" }, + { url = "https://files.pythonhosted.org/packages/9a/0d/f5e5a50322e9c45865e7b7a428ba6cd6527387cf0f2472492ac3cf746243/ty-0.0.72-py3-none-win32.whl", hash = "sha256:f25f72a67bd36cd247707c4784e52fad0b6b4f42a1b7dd14804110fa95c486ed", size = 11939708, upload-time = "2026-08-14T21:35:36.006Z" }, + { url = "https://files.pythonhosted.org/packages/3f/4e/8af3534b2e4214e6184a5a59c34101e94a68d578f081f97b995866bab1bf/ty-0.0.72-py3-none-win_amd64.whl", hash = "sha256:cdeee869341717e1736cea2e2d7856738c6957c320f584ed2f68c8f90100d2f5", size = 12643876, upload-time = "2026-08-14T21:35:38.141Z" }, + { url = "https://files.pythonhosted.org/packages/ff/ea/a2606e654c7276bd08586391a2525b0af3f3bf60228a8c57b2d248f273f9/ty-0.0.72-py3-none-win_arm64.whl", hash = "sha256:1bd3ac3ed4424a6d6990a85dc388556aea012bd752de21349a84b685951de0d8", size = 12394857, upload-time = "2026-08-14T21:35:40.277Z" }, ] [[package]]