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

Summary: Quick fix "Remove [xxx] from import": problem when xxx is in module name
Product: python Reporter: dhalbert <dhalbert>
Component: EditorAssignee: Torbjorn Norbye <tor>
Status: CLOSED WONTFIX    
Severity: normal CC: Jenselme
Priority: P3    
Version: 6.x   
Hardware: All   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

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.