ArangoDB-Community / pyArango

Python Driver for ArangoDB with built-in validation
https://pyarango.readthedocs.io/en/latest/
Apache License 2.0
238 stars 90 forks source link

Is is used insted of instanceof #116

Closed thekie closed 6 years ago

thekie commented 6 years ago

I changed x.__class__ is Y everywhere to instanceof(x, Y) where x is an object so that we can use subclasses of Y as well. This is useful in case we're injecting our own documentClass for a collection since the function to link documents are looking for instances of Document to use the _id property.

codecov-io commented 6 years ago

Codecov Report

Merging #116 into master will not change coverage. The diff coverage is 80%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #116   +/-   ##
=======================================
  Coverage   80.28%   80.28%           
=======================================
  Files          12       12           
  Lines        2141     2141           
=======================================
  Hits         1719     1719           
  Misses        422      422
Impacted Files Coverage Δ
pyArango/tests/tests.py 97.67% <ø> (ø) :arrow_up:
pyArango/query.py 82.6% <100%> (ø) :arrow_up:
pyArango/document.py 74.37% <100%> (ø) :arrow_up:
pyArango/collection.py 67.62% <50%> (ø) :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 93fabf3...3355055. Read the comment docs.

tariqdaouda commented 6 years ago

Good call!