For certain imports, it would be nice to scope warning filters (e.g. in RobotLocomotion/drake#10527).
In my case, I want to do something like:
import warnings
with warnings.catch_warnings():
warnings.filterwarnings(
"ignore", category=ImportWarning,
message="can't resolve package from __spec__")
import meshcat
Without mods to 2.3.1, it throws a warning about this. If I add "with" to the allowed keywords, then it works.
Would it be possible to add this keyword?
For certain imports, it would be nice to scope warning filters (e.g. in RobotLocomotion/drake#10527).
In my case, I want to do something like:
Without mods to 2.3.1, it throws a warning about this. If I add "with" to the allowed keywords, then it works.
Would it be possible to add this keyword?