-
Notifications
You must be signed in to change notification settings - Fork 6
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
KGCL prototype library and webapp #9
Conversation
parser/parser.py
Outdated
command = tree.data | ||
#print("Command: " + command) | ||
|
||
if(command == "rename"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: can we write this as more idiomatic python. @jamesaoverton do you have a preferred linter - flake8, black, ..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flake8 and black are good for different things, so Knocean usually uses both. @ckindermann please follow https://github.com/knocean/practises/tree/master/python#style and ask me if you have any questions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jamesaoverton will do!
parser/parser.py
Outdated
if(replacement_id_list): | ||
t = next(replacement_id) | ||
replacement_token = next(get_tokens(t)) | ||
return python.kgcl.NodeObsoletion(id=id, about_node=label_token, has_direct_replacement=replacement_token) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: we should fix imports, should be either
from kgcl import NodeObsoletion, ...
...
return NodeObsoletion(...
or perhaps
import kgcl
...
return kgcl.NodeObsoletion(...
This is just a bare-bones Flask application that shows how I instantiate classes in the KGCL data model for testing purposes.
https://kgcl.ontodev.com/