Those classes are used by wrapper scripts and we should not have to
import the rest of mesonlib, build.py, and all their dependencies for
that.
This renames mesonlib/ directory to utils/ and add a mesonlib.py module
that imports everything from utils/ to not have to change `import
mesonlib` everywhere. It allows to import utils.core without importing
the rest of mesonlib.
Some things are disabled by default because most people are not
interested in them. But (non-obviously) adding a list of ignores to the
flake8 configuration file will actually turn back on anything you didn't
explicitly specify.
This reduces the number of flake8 warnings by about 100, a vast chunk of
which are
E704 multiple statements on one line (def)
which turn out to actually be T.overload or typing definitions with
def func(): ...
which is understandably quite reasonable to permit.
The last instances of
try:
...
except:
...
were removed in bf98ffca. The sideci.yml file was updated, but the
flake8 config still allows this. Ensure that flake8 tests fail if this
questionable construct appears again.
D lang compilers have an option -release (or similar) which turns off
asserts, contracts, and other runtime type checking. This patch wires
that up to the b_ndebug flag.
Fixes#7082
It has too many false positives. It was complaining about things like
if this:
fn = some_func
else:
fn = lambda x: ...
Where obviously, "fn" can't be a def, and it would be silly to introduce
some other name to use as the def, just to assign it to fn.