Determine file type from --stdin-filename
#2167
Labels
C: configuration
CLI and configuration
S: accepted
The changes in this design / enhancement issue have been accepted and can be implemented
T: enhancement
New feature or request
Is your feature request related to a problem? Please describe.
Currently,
black
ignores the filename passed to--stdin-filename
to determine if it is a python file or stub file for formatting. This is frustrating for me because I have to set up a separate file type for python stub files to usecoc.nvim
+coc-diagnostic
in order to use a different command line invocation (adding--pyi
) to process stub files.Describe the solution you'd like
When
black
is invoked with--stdin-filename
, it should set theis_pyi
flag on theMode
like what is done at the beginning offormat_file_in_place()
.The text was updated successfully, but these errors were encountered: