KotlinIsland / KotlinIsland/basedmypy

Warn against iterating strings

Open
#651 5 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 f(s: str):
for item in a:
...
```

Iterating is most often a mistake. We should have an option to prevent these usages .

```py
a: Iterable[str] = "asdf" # warn: erm, that's silly
```

Contributor guide

Open the contributing guide

Research direction

The issue provides no file or test entry point. Start by locating the checker logic and option definitions for iterable and string diagnostics, then clarify whether both loop iteration and assigning a string to Iterable[str] should be covered. Done means the option consistently handles the shown usages and has tests for them.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.