unitedstates / inspectors-general

Collecting reports from Inspectors General across the US federal government.
https://sunlightfoundation.com/blog/2014/11/07/opengov-voices-opening-up-government-reports-through-teamwork-and-open-data/
Creative Commons Zero v1.0 Universal
106 stars 21 forks source link

use importlib rather than __import__ #211

Open paultag opened 9 years ago

paultag commented 9 years ago

__import__ is a pretty low level guy (also, on 3.x, it's a wrapper around importlib anyway), and in general, the common practice is to use importlib.import_module.

I'll send in a PR, but I'm just filing some tickets to remember later.

konklone commented 9 years ago

Nice -- PR welcome!

divergentdave commented 7 years ago

Reference material: https://github.com/openelections/openelections-core/issues/217 https://github.com/openelections/openelections-core/commit/9f8dc2d4a594ee0ccaec24d81d0d79ad99ff3d67 https://github.com/openelections/openelections-core/issues/227