unitedstates / congress

Public domain data collectors for the work of Congress, including legislation, amendments, and votes.
https://github.com/unitedstates/congress/wiki
Creative Commons Zero v1.0 Universal
930 stars 202 forks source link

Fix relative imports #292

Closed michaelblyons closed 1 year ago

michaelblyons commented 1 year ago

I have a Python project wherein I import this package. The from X import Y[^1] buried in some of the data processing files requires united-states-congress to be the running project. Those imports crash the processing because Python tries to import them from my project instead.

Changing the imports to relative imports points Python to the right place. A possible alternative is fully-qualifying them.[^2]

[^1]: e.g. from bills import output_for_bill [^2]: e.g. from congress.tasks.bills import output_for_bill