mahmoud / glom

☄️ Python's nested data operator (and CLI), for all your declarative restructuring needs. Got data? Glom it! ☄️
https://glom.readthedocs.io
Other
1.89k stars 61 forks source link

Enforce that specifier types must be passed as instances #190

Closed mahmoud closed 4 years ago

mahmoud commented 4 years ago

Fixes #184

codecov[bot] commented 4 years ago

Codecov Report

Merging #190 into master will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #190   +/-   ##
=======================================
  Coverage   98.93%   98.93%           
=======================================
  Files          26       26           
  Lines        4038     4042    +4     
  Branches      575      575           
=======================================
+ Hits         3995     3999    +4     
  Misses         20       20           
  Partials       23       23           
Impacted Files Coverage Δ
glom/core.py 98.85% <100.00%> (+<0.01%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 0d6a45b...622048d. Read the comment docs.

mahmoud commented 4 years ago

And just a bit more context: I decided it's fine to ignore callable attributes and class/static methods, as glomit is like an operator, and Python's builtin operator overloading / data model only works on instance methods. Possibly simpler to reason about, and way simpler to implement.