google-research / planet

Learning Latent Dynamics for Planning from Pixels
https://danijar.com/planet
Apache License 2.0
1.18k stars 202 forks source link

PEP8 code style formatting #12

Closed piojanu closed 5 years ago

piojanu commented 5 years ago

This PR adds pep8 and pycodestyle configurations so tools like autopep8 and pycodestyle can be used to keep the code consistent across different IDEs and developers workspaces. It also runs autopep8 on every .py file so future diffs shouldn't show differences in formatting.

piojanu commented 5 years ago

For developers I recommend this pre-commit hook to keep the code clean: https://gist.github.com/piojanu/50aefcef8d1b1d3e0761c6beea3a6336.

danijar commented 5 years ago

Thanks for this PR as well. I don't think I will merge this since we're using a different linter internally at Google. I might set up a linter configuration that's consistent with this (e.g. four space indent to continue lines) at some point in the future. On the other hand, I don't think this is very necessary for a research code base.