Skip to content

Commit 1874018

Browse files
mvaledproofit404
authored andcommitted
Detect if the current file is a pyi to format accordingly (#26)
1 parent 17b48ee commit 1874018

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

blacken.el

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ Return black process the exit code."
112112
(list "--fast"))
113113
(when blacken-skip-string-normalization
114114
(list "--skip-string-normalization"))
115+
(when (string-match "\.pyi$" (buffer-file-name (current-buffer)))
116+
(list "--pyi"))
115117
'("-")))
116118

117119
;;;###autoload

0 commit comments

Comments
 (0)