Skip to content

Conversation

@vivster7
Copy link
Contributor

If a --format argument is passed to ReplaceImport, we try and represent it as an Import object.

At this point, we won't have a context.filename and will raise an error when trying to normalize a relative import. We don't need to worry about relative imports for imports being passed as --format.

This PR moves the relative import check up first so it'll early exit and skip the context.filename lookup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants