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
With the black profile, not sure about others, formatting is dependent on the extension.
When using stdin to format a file the extension information isn't passed along,
so there isn't a way to format .pyi files the same as when passing the file path.
Thanks for this well thought out issue! I've always meant for isort to support this, and indeed it already does for API based usage, but until now this functionality was not exposed to the CLI.
In develop, to be released with 5.7.0 some time this month, both features (specifying the filename and specifying the extension formatting to use) are now available:
With the black profile, not sure about others, formatting is dependent on the extension.
When using stdin to format a file the extension information isn't passed along,
so there isn't a way to format
.pyi
files the same as when passing the file path.Example
example file
main.pyi
:No changes necessary.
and via stdin
conclusion
I think one solution is to specify the extension manually, or give isort a fake
filename to use.
rel: #942
rel: microsoft/vscode-python#14702
The text was updated successfully, but these errors were encountered: