$ which svnlook
/usr/bin/svnlook
import subprocess
if __name__ == '__main__':
rc = subprocess.run(['svnlook', 'help'], stdout=subprocess.PIPE, stderr=subprocess.PIPE, encoding='utf8')
print()
print('----- stdout -----')
print(rc.stdout)
print('----- stderr -----')
print(rc.stderr)
print('----- end -----')
(.venv) D:\Documents\PycharmProjects\tstdbg>mypy --strict tst.py
tst.py:21: error: Incompatible default for argument "a" (default has type "None", argument has type "A")
tst.py:21: error: Incompatible default for argument "b" (default has type "None", argument has type "B")
Found 2 errors in 1 file (checked 1 source file)
#include <iostream>
extern "C" void glutDisplayFunc(void(* func)())
{
func();
}
class Func
{
public:
explicit Func(const std::string &txt)
{
m_txt = txt;
}
void operator()() const
{
std::cout << m_txt << std::endl;
}
private:
std::string m_txt;
};
void ggg(const Func& func)
{
func();
}
int main()
{
glutDisplayFunc([]{return ggg(Func("cde"));});
return 0;
}
#include <iostream>
extern "C" void glutDisplayFunc(void(* func)())
{
func();
}
void fff(const std::string &txt)
{
std::cout << txt << std::endl;
}
int main()
{
glutDisplayFunc([]{return fff(std::string("abc"));});
return 0;
}