You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @timothycrosley! Thanks a lot for this awesome project! I was just wondering about the new (and useful) function you added with version 5.7.0: find_imports_in_code (and the corresponding _stream equivalents.
Glad you find the project useful! I'm on board to improve the statement method (though with the disclaimer it may not print out the optimal statement - just a functional one going forward). My personal use for the new functionality was just to quickly identify imports for use in making project dependency graphs faster than can be done with full AST parsing as is generally used (for things like automatic Bazel integration) - there it's not at all important that statement results in functioning code - so I hadn't even considered it! Glad to hear others find the functionality useful!
Hey @timothycrosley! Thanks a lot for this awesome project! I was just wondering about the new (and useful) function you added with version 5.7.0:
find_imports_in_code
(and the corresponding_stream
equivalents.Consider the following example:
this (
import typing.List
) is invalid code. Shouldn'timports[0].statement()
rather producefrom typing import List
?I'd replace the
statement
methodisort/isort/identify.py
Lines 25 to 31 in 6230dc3
with something like
what do you think?
The text was updated successfully, but these errors were encountered: