David Peter

Results 1367 comments of David Peter

Thank you for reporting this. We should fix this. That's why the *"Special-case handling of IntEnum, StrEnum"* and *"auto() values"* items are still unchecked in the description above. We could...

Thank you for reporting this. Pyright seems to support this, but mypy and pyrefly also think that something is wrong here. I think it's reasonable for `ty` to assume that...

For more context, see also this discussion: https://github.com/astral-sh/ruff/pull/22018/files#r2630663471

> if the declared type is assignable to the inferred type, that suggests it is at least as precise Thinking about this again, that's obviously not true. If the types...

Maybe it makes sense to move the discussion around external mutation to a separate ticket, and to focus on two concrete examples: ### Example 1: declared type more precise than...

> But I'm not sure I would use the term "potentially-unsafe" to describe "collapsing" the type from `Any` to `str`. Collapsing the type here can only ever result in more...

I clearly haven't thought through all implications and still need to internalize some gradual-typing concepts, so please feel free to cut off the discussion here. It seems reasonable to try...

> If I have a question here, it's more how _useful_ it is, since an inferred type of `str & Any` doesn't really behave differently from `Any` I think it...

@dhruvmanila observed a false positive related to `TypeGuard` after some changes related to `**kwargs`. We should see that false positive disappearing when `TypeGuard` is implemented properly. > https://github.com/mit-ll-responsible-ai/hydra-zen/blob/8f8d30622b85983e0f54004ea945858a72f32469/src/hydra_zen/structured_configs/_implementations.py#L2952. The parse_strict_dataclass_option...

> ```python > # mypy_boto3_s3/__init__.py > try: > from .service_resource import S3ServiceResource > except ImportError: > from builtins import object as S3ServiceResource # type: ignore[assignment] > ``` I can't find...