fsspec / fsspec/filesystem_spec
Instance of 'OpenFiles' has no 'path' member (no-member)
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.4k
- Forks
- 490
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 38
Description
Hi,
I'm trying to use fsspec, but I cannot convince pylint of the correctness of my program:
import fsspec
file = fsspec.open("foo")
print(file.path)
Calling pylint test.py yields:
test.py:1:0: C0114: Missing module docstring (missing-module-docstring)
test.py:4:6: E1101: Instance of 'OpenFiles' has no 'path' member (no-member)
For some reason, pylint seems to think that open returns OpenFiles, but it actually returns OpenFile. Could it be that the type information is somehow incorrect? The program runs fine, so it definitely is a false positive.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported pylint warning with the provided fsspec.open example. Inspect the type information and declarations for fsspec.open, OpenFile, and OpenFiles to find why the return value is inferred incorrectly. Done means the example no longer reports the false no-member warning, with a regression test covering the case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100