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

Type annotations, doc-string re-formatting, code cleanup. #100

Merged
merged 7 commits into from Jul 25, 2018
Merged

Conversation

djsaunde
Copy link
Collaborator

Mostly cosmetic changes or refactoring.

Type annotations are useful because

  1. IDEs can catch errors before you run the code
  2. mypy can be used to catch type errors as well
  3. Makes documentation easier (don't have to annotate argument types in doc strings)

That said, type annotation doesn't have to be done for every function.

If you use the PyCharm IDE, type annotations and auto-documentation works really well.

I also changed many imports of the form

from bindsnet.network import *

to be more explicit, i.e.,

from bindsnet.network import Network

so we're not reloading modules all over the place.

@Hananel-Hazan Hananel-Hazan merged commit 34fcd3c into master Jul 25, 2018
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

Successfully merging this pull request may close these issues.

None yet

2 participants