#1499 wrong "unused import" warning for metaclass

pending
nobody
None
5
2012-05-04
2012-04-21
Steven Buroff
No

Apparently the use of an import as a metaclass isn't recognized by pydev. The attached example file gets a warning even though the import is necessary for the "class XXX(metaclass=ABCMeta):" declaration.

Discussion

  • Steven Buroff
    Steven Buroff
    2012-04-21

    Example of problem.

     
    Attachments
  • Fabio Zadrozny
    Fabio Zadrozny
    2012-04-24

    • status: open --> pending
     
  • Fabio Zadrozny
    Fabio Zadrozny
    2012-04-24

    Hi Steven,

    It's working for me... have you set your project to use the Python 3 grammar (the default is Python 2 if you don't set it).

    To configure it, go to the pydev package explorer, right click project > properties > pydev - interpreter/grammar and set your grammar to Python 3.

     
  • Steven Buroff
    Steven Buroff
    2012-04-30

    • status: pending --> open
     
  • Steven Buroff
    Steven Buroff
    2012-04-30

    I had configured for 3.2.3. That was what I had when I got the error.

     
  • Fabio Zadrozny
    Fabio Zadrozny
    2012-05-04

    • status: open --> pending
     
  • Fabio Zadrozny
    Fabio Zadrozny
    2012-05-04

    Can you send the following information so that I can try to diagnose it better:

    1. Screenshot of the error (editor and problems view)
    2. Screenshot of your project configuration (right click project > properties > pydev interpreter - grammar)
    3. screenshot of your interpreter configuration: window > preferences > pydev > interpreter - python