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

Remove faulty override of reset method in JoypadSpace wrapper #93

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

acjh
Copy link

@acjh acjh commented Jun 27, 2023

Description

Fixes https://stackoverflow.com/questions/76509663/typeerror-joypadspace-reset-got-an-unexpected-keyword-argument-seed.

JoypadSpace doesn't correctly override the reset() method of Wrapper.

  • JoypadSpace reset() was implemented for gym 0.10.5 in nes-py 0.8.7 (Jul 2018).
  • Wrapper reset() was defined with **kwargs in gym 0.10.6 (Oct 2018).
    Though at the time Env reset() did not accept any parameters.
  • Env reset() started to accept seed parameter in gym 0.22.0 (Feb 2022).

Since nes-py now requires gym>=0.17.2, it is unnecessary to implement (override) reset() method.

Type of change

Please select all relevant options:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Since nes-py now requires gym>=0.17.2, removing the method override is a non-breaking change.

How Has This Been Tested?

Not tested yet (I'm not a nes-py user), but the fix is straightforward.

Test Configuration

NIL.

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • [N.A.] I have commented my code, particularly in hard-to-understand areas
  • [N.A.] I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works

@ItaiBear ItaiBear mentioned this pull request Jul 17, 2023
10 tasks
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.

1 participant