fsspec / fsspec/filesystem_spec

Instance of 'OpenFiles' has no 'path' member (no-member)

Open
#1,678 1 comment 0 reactions 0 assignees View on GitHub

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

  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.

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.