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

Fix typing issue in python 3.9 #77

Merged
merged 1 commit into from
Sep 18, 2023
Merged

Fix typing issue in python 3.9 #77

merged 1 commit into from
Sep 18, 2023

Conversation

ernestum
Copy link
Collaborator

@ernestum ernestum commented Sep 12, 2023

There is one issue with the way the MaskScoreWrapper uses generics in python 3.9.
This PR fixes it.

I could not figure out how to place the type annotations in such a way that it is not tripping the runtime checks in Python 3.9 and pytype at the same time. So I decided to remove them alltogether and inherit from gym.ObservationWrapper just like ObsCastWrapper.

@codecov
Copy link

codecov bot commented Sep 12, 2023

Codecov Report

Merging #77 (d56c50d) into master (a7954c2) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##            master       #77   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           26        26           
  Lines         1096      1089    -7     
=========================================
- Hits          1096      1089    -7     
Files Changed Coverage Δ
src/seals/util.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ernestum ernestum force-pushed the typing-fixes-py39 branch 2 times, most recently from d5a0a46 to 7b9fe61 Compare September 12, 2023 13:47
Copy link
Member

@AdamGleave AdamGleave left a comment

Choose a reason for hiding this comment

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

LGTM, inheriting from ObservationWrapper seems cleaner anyway

@AdamGleave AdamGleave merged commit 90f68cf into master Sep 18, 2023
@AdamGleave AdamGleave deleted the typing-fixes-py39 branch September 18, 2023 19:57
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.

2 participants