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

Some typing improvements, add py.typed #284

Merged
merged 14 commits into from
Nov 12, 2022

Conversation

micimize
Copy link
Contributor

Description

  • Improves some method typing for the MinigridEnv api and elsewhere.
  • Adds a py.typed marker so that tooling like mypy will know to use minigrid's type annotations.
  • Changed name in setup.py to minigrid

I did not find a CONTRIBUTING.md but did pre-commit and ensured all tests pass.

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change which adds functionality)

Checklist:

  • I have run the pre-commit checks with pre-commit run --all-files
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Copy link
Member

@pseudo-rnd-thoughts pseudo-rnd-thoughts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, this is very helpful.
Could you fix the pre-commit issues

Also, I believe minigrid is python 3.7+ so we can add from __future__ import annotations for improved annotations. The pre-commit pyupgrade should do most of the hard work so just add the import and run pre-commit.

Do you use minigrid a lot? Would you be interested in helping with adding more features? If so, could you join the farama foundation discord (https://discord.gg/bnJ6kubTg6) and message me, PseudoRnd

setup.py Outdated Show resolved Hide resolved
@micimize
Copy link
Contributor Author

@pseudo-rnd-thoughts ok – I've added an --add-import to isort along with autoflake to remove the leftover imports, and changed the ordering to reduce the need for re-running pre-commit (pyupgrade removes need for imports, removing imports effects isort ordering)

I have only really just started using it for my project – some details here: #168 (comment). But would be happy to join the discord – can you resend an invite? It became invalid when discord tried to make me a new account :/

@pseudo-rnd-thoughts
Copy link
Member

Thanks for the changes, here is a new link https://discord.gg/N8CwYyGt
Could you revert the setup name then we can merge

@pseudo-rnd-thoughts pseudo-rnd-thoughts merged commit fc41b5e into Farama-Foundation:master Nov 12, 2022
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