jazzband / geojson

Python bindings and utilities for GeoJSON
https://pypi.python.org/pypi/geojson/
BSD 3-Clause "New" or "Revised" License
898 stars 120 forks source link

Change made to handle all real numbers as coordinates #173 #188

Closed trcmohitmandokhot closed 1 year ago

trcmohitmandokhot commented 1 year ago

Changes made per discussion in #173. Suggestions were made to handle all real numbers as inputs, rather than the original float, int, Decimal types only. While the original type-check works for a majority of cases, there are users who may try to create geojson objects from objects that are not inherited from the python base-classes listed above. A more generic solution was to type-check against the abstract Numbers class, which has a nicely laid out hierarchy per PEP 3141.

codecov[bot] commented 1 year ago

Codecov Report

Merging #188 (0eda1a4) into master (d848065) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master     #188   +/-   ##
=======================================
  Coverage   94.90%   94.90%           
=======================================
  Files          10       10           
  Lines         353      353           
  Branches       86       86           
=======================================
  Hits          335      335           
  Misses         11       11           
  Partials        7        7           
Impacted Files Coverage Δ
geojson/geometry.py 100.00% <100.00%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more