Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxGhenis committed Oct 4, 2020
1 parent 19d5e9e commit 92511fc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scf/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def scf_url(year: int):
:rtype: str
"""
assert year in VALID_YEARS, "The SCF is not available for " + str(year)
return ('https://www.federalreserve.gov/econres/files/scfp' +
return ('https://www.federalreserve.gov/econres/files/scfp' +
str(year) + 's.zip')


Expand Down
2 changes: 2 additions & 0 deletions scf/tests/test_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
def equal_elements(l1, l2):
return set(l1) == set(l2)


def test_load_multiple_years():
YEARS = [2016, 2019]
res = scf.load(YEARS, ['income', 'networth'])
# Should return the specified columns, plus year and wgt.
assert equal_elements(res.columns, ['income', 'networth', 'wgt', 'year'])
assert equal_elements(res.year.unique().tolist(), YEARS)


def test_load_single_year():
# Test with a single year and single column.
res = scf.load(2016, 'networth')
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
setup(
name="scf",
version="0.1.0",
description="Python package for working with the Survey of Consumer Finances microdata.",
description=("Python package for working with the Survey of Consumer " +
"Finances microdata."),
url="http://github.com/maxghenis/scf",
author="Max Ghenis",
author_email="[email protected]",
Expand Down

0 comments on commit 92511fc

Please sign in to comment.