Open glesica opened 4 years ago
Create a constants.py file and move things like this (in index.py) into it to avoid sprinkling strings around:
return_id=row["RETURN_ID"], filing_type=row["FILING_TYPE"], ein=row["EIN"], tax_period=row["TAX_PERIOD"], sub_date=row["SUB_DATE"], taxpayer_name=row["TAXPAYER_NAME"], return_type=row["RETURN_TYPE"], dln=row["DLN"], object_id=row["OBJECT_ID"],
We could also then define the IndexRecord dynamically and use those constants by using the syntax below:
IndexRecord
Employee = collections.namedtuple('Employee', ['name', 'id'])
The disadvantage to the syntax at the bottom is that we don't get type hinting, at least I'm pretty sure.
Create a constants.py file and move things like this (in index.py) into it to avoid sprinkling strings around:
We could also then define the
IndexRecord
dynamically and use those constants by using the syntax below: