Warn for IO types like io.BytesIO

Open
#463 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
devtools

Research direction

The issue does not name any files, tests, or entry points. First determine how flake8-pyi implements type-related warnings and how IO annotations such as io.BytesIO and typing.BinaryIO should be classified; done requires an agreed warning scope and corresponding tests.

Written by the indexing model from the issue text.

Description

type-feature

No warnings are raised for this:

from io import BytesIO


def open(fp: BytesIO):
    ...

Instead of the concrete io.BytesIO, this should probably be something more specific for what exactly the file-like object actually does, or possibly even typing.BinaryIO.

Similarly for other IO things.

Should flake8-pyi add some warnings in this area?

Dominant language
Python
Stars
84
Forks
26
Avg merge
1d 21h
Merged PRs (30d)
2

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PyCQA/flake8-pyi

All issues in PyCQA/flake8-pyi

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.