fix some flakes8 errors. use a LongInt class for int and long between python versions