CODAIT / graph_def_editor

GraphDef Editor: A port of the TensorFlow contrib.graph_editor package that operates over serialized graphs
Apache License 2.0
31 stars 16 forks source link

Switch to Python 2.7-compatible type hints #34

Closed frreiss closed 5 years ago

frreiss commented 5 years ago

This PR implements the first part of #32, switching the type hints from Python 3 syntax to the Python 2.7-compatible syntax. Other parts of #32 are not implemented in this PR.

frreiss commented 5 years ago

LGTM, should the typing module be optionally imported since its not available for 2.7? Is Python 2.7 able to enforce the types?

I don't really know at the moment, to be honest. Python 2.7 is broken on my laptop, so I have no way to test things.

BryanCutler commented 5 years ago

No problem, I can try it out for Python 2.7 after this is merged.

BryanCutler commented 5 years ago

@frreiss , I was testing this out with Python 2.7 and am making some additional changes - mostly some remaining type checking. Would you like me to make a PR into your branch?

frreiss commented 5 years ago

That would be fine, or I can merge these changes and you can make a PR against master. Which would you prefer?

BryanCutler commented 5 years ago

I'm good with merging these and then I'll do a followup PR against master with the rest of the changes to get running on Python 2.7

frreiss commented 5 years ago

Merging now.