You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@avro.apache.org by GitBox <gi...@apache.org> on 2020/08/17 15:06:37 UTC

[GitHub] [avro] erikerlandson commented on a change in pull request #841: [AVRO-2474][WIP] - unit analysis for Avro python schema

erikerlandson commented on a change in pull request #841:
URL: https://github.com/apache/avro/pull/841#discussion_r471543240



##########
File path: lang/py/avro/io.py
##########
@@ -640,14 +644,19 @@ def match_schemas(writers_schema, readers_schema):
       return True
     return False
 
-  def __init__(self, writers_schema=None, readers_schema=None):
+  def __init__(self, writers_schema=None, readers_schema=None, unit_db=None):
     """
     As defined in the Avro specification, we call the schema encoded
     in the data the "writer's schema", and the schema expected by the
     reader the "reader's schema".
     """
     self._writers_schema = writers_schema
     self._readers_schema = readers_schema
+    if (unit_db is not None) and (not isinstance(unit_db, UnitAnalysisDB)):

Review comment:
       Thanks, that's a good idea! I will probably not do any further work on this unless/until the avro committee votes this feature in, but I'll add type hints if we decide to proceed with the PR.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org