Skip to content

Commit

Permalink
mypy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
palewire committed Jul 25, 2023
1 parent 32e33f3 commit 55a7af2
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,4 @@ repos:
- id: mypy
additional_dependencies:
- types-requests
- types-retry
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ pre-commit = "*"
mypy = "*"
types-requests = "*"
rich = "*"
types-retry = "*"

[packages]
requests = "*"
Expand Down
10 changes: 9 additions & 1 deletion Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions nasa_wildfires/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ def _get_features(csv_path: str, verbose: bool = False) -> list[geojson.Feature]

# Convert to GeoJSON
features = []
for r in reader:
coords = map(float, [r["longitude"], r["latitude"]])
f = geojson.Feature(geometry=geojson.Point(coords), properties=r)
for row in reader:
coords = map(float, [row["longitude"], row["latitude"]])
f = geojson.Feature(geometry=geojson.Point(coords), properties=row)
features.append(f)

# Return the GeoJSON feature list
Expand Down
4 changes: 3 additions & 1 deletion test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

from nasa_wildfires import get_modis, get_viirs_noaa, get_viirs_suomi, options

COMBO_LIST = list(itertools.product(options.REGION_DICT.keys(), options.TIME_RANGE_LIST))
COMBO_LIST = list(
itertools.product(options.REGION_DICT.keys(), options.TIME_RANGE_LIST)
)


class NasaWildfiresUnitTest(unittest.TestCase):
Expand Down

0 comments on commit 55a7af2

Please sign in to comment.