KotlinIsland / KotlinIsland/basedmypy

enforce parenthesis on ambigious types

Open
#581 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
Python
Stars
202
Forks
6
PR merge metrics
No merged PRs in 30d

Description

```py
def guard(x: object, y: object) -> a is int & b is str if True else a is str & b is int: ...
```
The tricky part is that `ast` removes parens...

Contributor guide

Open the contributing guide

Research direction

Start with the provided guard annotation and investigate how Python's ast handling removes parentheses before basedmypy processes the type expression. Determine which ambiguous type forms require enforced parentheses and how the example should be diagnosed; done means those forms are handled unambiguously.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.