Kludex / Kludex/no-optional

Remove duplicated `Union` import

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue help wanted
Dominant language
Python
Stars
57
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Currently, when `Optional` is found on the import statement, it's just replaced by `Union`.

Although `isort` (I think), removes the duplication statement, it would be cool to not generate a duplicated one for those who don't use `isort`...

Contributor guide

No contributing guide indexed for this repository

Research direction

Locate the logic that handles Optional in import statements and inspect how it replaces Optional with Union. Reproduce an import containing Optional and an existing Union, then verify the generated import contains Union only once; update the relevant test if the repository has coverage for this behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.