This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 188841 - Quick fix "Remove [xxx] from import": problem when xxx is in module name
Summary: Quick fix "Remove [xxx] from import": problem when xxx is in module name
Status: CLOSED WONTFIX
Alias: None
Product: python
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All Linux
: P3 normal (vote)
Assignee: Torbjorn Norbye
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-21 20:30 UTC by dhalbert
Modified: 2017-06-23 08:06 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dhalbert 2010-07-21 20:30:07 UTC

    
Comment 1 dhalbert 2010-07-21 20:33:56 UTC
Consider this code sample:

  from AbcDefGhi import Ghi, Ghijkl, Xyz
  Ghijkl()
  Xyz()

Ghi is not used. If you click on the quick fix "Remove [Ghi] from import" or "Remove all unused imports", the code gets turned into:

  from AbcDef import Ghi, Ghijkl, Xyz
  Ghijkl()
  Xyz()

Notice that "AbcDefGhi" has been damaged, it has turned into  "AbcDef". "Ghi" has been removed both from the import list and the module name. Also note Ghijkl is not damaged.
Comment 2 Jenselme 2017-06-22 22:11:41 UTC
Not sure it is still relevant with the current version. Closing this as old bug. If this is still a thing, please reopen and accept my apologies.
Comment 3 Jiri Kovalsky 2017-06-23 08:06:12 UTC
Thanks for your evaluation Julien. Reporter, if you think your issue is still valid and needs to be addressed, don't hesitate to reopen it with additional information. Closing for now.