opencadc / caom2tools

Common Archive Observation Model - data engineering tools
2 stars 13 forks source link

Fixed TypeError when instantiating Artifact. #78

Closed yeunga closed 6 years ago

yeunga commented 6 years ago

When we import str from builtins, str is of type future.types.newstr.newstr. When instantiating an Artifact, a uri str is passed in and the Artifact uri attribute is set to the value of the uri str passed in. The type check can fail if the uri str is of type str since we are expecting a newstr type.

So when importing str from builtins, we do not overwrite str and import it as something else, say newstr. We can now use newstr and str in our type checking code.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.002%) to 93.086% when pulling 67c03c15a1a0a3089736b2138f9f54e8e9577d1f on yeunga:str-type-error-fix into 2ccc782f640d26a43b9299dc81785a58874d0277 on opencadc:master.