albertas / deadcode

Find and fix unused Python code using command line.
GNU Affero General Public License v3.0
90 stars 4 forks source link

Deadcode breaks from...import statements #24

Open Freyb opened 2 weeks ago

Freyb commented 2 weeks ago

deadcode seems to break import...from statements if contains an unused item.

These are the modifications it makes:

-from mymodule.test import used_func, unused_func
+from mymodule.test import used_func,         # <- note the trailing comma
-from mymodule.test import unused_func
+from mymodule.test import

deadcode version: 2.4.1