Skip to content
This repository was archived by the owner on Mar 7, 2021. It is now read-only.
This repository was archived by the owner on Mar 7, 2021. It is now read-only.

undefined name '__path__' #7

Open
@kisielk

Description

@kisielk

__path__ is a built-in attribute of all Python modules in a package so should not be flagged as undefined by pyflakes.

See http://docs.python.org/tutorial/modules.html#packages-in-multiple-directories

For example, create a directory called foo/ with __init__.py:

print __path__

Then run the python interpreter:

Python 2.6.4 (r264:75706, Jan 27 2010, 12:22:48) 
[GCC 4.3.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> import foo
['foo']
>>> 

I'm not sure if pyflakes can be made intelligent enough to not flag this only when working inside a package module, but it probably should just not flag it at all.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions