Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KozaApp.schema is never initialized #155

Open
ptgolden opened this issue Oct 29, 2024 · 0 comments
Open

KozaApp.schema is never initialized #155

ptgolden opened this issue Oct 29, 2024 · 0 comments
Assignees

Comments

@ptgolden
Copy link
Member

I'm familiarizing myself with the codebase and cleaning up some type annotations, and I've noticed something off with the write method in the KozaApp class. Whether or not the class validates depends on the presence of the schema attribute in the class instance:

koza/src/koza/app.py

Lines 151 to 154 in fceafe5

def write(self, *entities):
# If a schema/validator is defined, validate before writing
# if self.validate:
if hasattr(self, 'schema'):

However, the code that sets that attribute is commented out in the __init__ method:

koza/src/koza/app.py

Lines 52 to 57 in fceafe5

if schema:
# self.validate = True
# self.schema = schema
# self.node_type = node_type
# self.edge_type = edge_type
self.converter = KGXConverter()

It looks like it was removed in a0ba9cb. Is it intentional that that block of code in write() should never run?

@ptgolden ptgolden self-assigned this Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant