Problem with Pylint's handling on __all__

Bug #190542 reported by Curtis Hovey
2
Affects Status Importance Assigned to Milestone
pylint (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: pylint

The following example code illustrates two surprises with Pylint's handling of __all__.
1. Including an nonexistant member should raise an error.
2. republishing an imported member in __all__ should not raise a warning that the import was unused.

"""Test Pylint's use of __all__.

* NonExistant is not defined in this module, and it is listed in
  __all__. An error is expected.

* This module imports path and republished it in __all__. No errors
  are expected.
"""
from os import path

__all__ = [
  'Dummy',
  'NonExistant',
  'path',]

class Dummy:
  """A class defined in this module."""

Revision history for this message
Curtis Hovey (sinzui) wrote :

This bug was confirmed upstream.

Changed in pylint:
status: New → Confirmed
Revision history for this message
Pander (pander) wrote :

Is this this a problem?

Pander (pander)
Changed in pylint (Ubuntu):
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.