style: Fix unused-import (F401)
Ruff rule: https://docs.astral.sh/ruff/rules/unused-import/ Also adjusted the flake8 config file.
These commits started from an exploratory branch last week where I was profiling temporal tests. Removing an import of SimpleModule when not needed ended up with a measurable improvement in temporal/t.rast.accumulate/testsuite/test_accumulation.py, when removing all cases except one, and benchmarking with hyperfine (10 runs) each case, on Windows and Linux. I don't have the correct output for these isolated changes, as it was combined with more changes, but if combined with using t.remove with 3 layers in the input argument instead of calling t.remove 3 times, the fastest case was 1.18x faster than base, and 1.15x faster than base (I don't remember what conditions it was, but there was one less change). But the base was already modified by a change in PLY, sot it doesn't match exactly what was on main here.
The other change to t.remove will be in another PR.
How does the __all__ thing work exactly?
How does the
__all__thing work exactly?
It explicitly lists what is available (exposed) when using star imports with the from module import * syntax.
https://docs.python.org/3/tutorial/modules.html#importing-from-a-package
https://www.geeksforgeeks.org/python-all/
https://medium.com/@akshatgadodia/demystifying-all-in-python-a-closer-look-at-module-exports-f4d818a12bb6
@arohanajit Just to let you know that this PR will fix all (or most known, detected through ruff's implementation) of the F401, so you don't spend time in it. It's just still waiting to be merged.