File tree Expand file tree Collapse file tree 3 files changed +14
-8
lines changed
Expand file tree Collapse file tree 3 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -28,13 +28,13 @@ jobs:
2828 python -m pip install -e ".[dev]"
2929
3030 - name : Lint
31- run : ruff check tests geodata /identity geodata /repository/sqlite_repository.py geodata /interfaces/cli.py scripts/benchmark_queries.py
31+ run : ruff check tests geocompare /identity geocompare /repository/sqlite_repository.py geocompare /interfaces/cli.py scripts/benchmark_queries.py
3232
3333 - name : Format check
34- run : black --check tests geodata /identity geodata /repository/sqlite_repository.py geodata /interfaces/cli.py scripts/benchmark_queries.py
34+ run : black --check tests geocompare /identity geocompare /repository/sqlite_repository.py geocompare /interfaces/cli.py scripts/benchmark_queries.py
3535
3636 - name : Type check
37- run : mypy geodata /identity geodata /repository/sqlite_repository.py geodata /interfaces/cli.py
37+ run : mypy geocompare /identity geocompare /repository/sqlite_repository.py geocompare /interfaces/cli.py
3838
3939 - name : Test
4040 run : pytest -q
Original file line number Diff line number Diff line change 1- __version__ = "0.6.4 "
1+ __version__ = "0.6.5 "
Original file line number Diff line number Diff line change @@ -82,10 +82,16 @@ def safe_divide(
8282 left = parse_number (dividend , default = default )
8383 right = parse_float (divisor , default = default )
8484
85- if isinstance (left , float ) and math .isnan (left ):
85+ try :
86+ left_num = float (left )
87+ right_num = float (right )
88+ except (TypeError , ValueError ):
8689 return np .nan
87- if isinstance (right , float ) and math .isnan (right ):
90+
91+ if math .isnan (left_num ):
92+ return np .nan
93+ if math .isnan (right_num ):
8894 return np .nan
89- if right == 0.0 :
95+ if right_num == 0.0 :
9096 return divide_by_zero
91- return left / right
97+ return left_num / right_num
You can’t perform that action at this time.
0 commit comments