matplotlib: move conditional into method
retext: use resource
Fix audit warnings