KotlinIsland

Results 502 comments of KotlinIsland

> * infers that `optional` is a `bool`, so can be `True` or `False` > * looks at all of the `return` / `raise` statements, and determines how parameters have...

I think modifying mypy checks are much better idea than making a typeguard

imo `TypeGuard`s are really broken atm and the intrinsic behavior is much better, so until typeguards are fixed I wouldn't bother.

I wonder if there is any use case where you want to type checker to think something is imported because at runtime it actually is imported. It should be a...

Interesting idea. We will discuss it at the next design meeting. - Similar to: #449

found another use case in the wild: ```py def cast_lambda(type: TypeExpr[Callable[P, R]], fn: Callable[P, R]) -> Callable[P, R]: ... ```

@AnonymouX47 What do you think would be best? providing `GenericAlias`s and specialization for all of: - `FunctionType` - `LambdaType` - same as `FunctionType` - `MethodType` - `BuiltinFunctionType` - `BuiltinMethodType` -...

@daniil-berg @AnonymouX47 @helpmefindaname How does this proposal look?

So we've got an open pr: - #619 With most of the work done already, not exactly what was discussed here.

take a look at `mypy.options.PER_MODULE_OPTIONS`