Debian Codegraph @

CodeFormatter/fmtBlack.cpp

raw
1 #include "fmtBlack.hpp"
2
3 #include "Platform.hpp"
4
5 fmtBlack::fmtBlack()
6 {
7 SetName("black");
8 SetFileTypes({ FileExtManager::TypePython });
9 SetDescription(_("The uncompromising python code formatter"));
10 SetShortDescription(_("black - a python formatter"));
11 SetConfigFilepath(wxEmptyString);
12 SetInplaceFormatter(true);
13
14 // local command
15 wxString black_exe;
16 ThePlatform->WhichWithVersion("black", { 20, 19, 18, 17, 16, 15, 14, 13, 12 }, &black_exe);
17 SetCommand({ black_exe, "--line-length", "80", R"#("$(CurrentFileRelPath)")#" });
18 }
19
20 fmtBlack::~fmtBlack() {}