Skip to content
This repository has been archived by the owner on Dec 11, 2022. It is now read-only.

Correct error type + order + error text #460

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

Conversation

OGordon100
Copy link

@OGordon100 OGordon100 commented Sep 8, 2020

I see 2 issues with the ObservationStackingFilter object.

The current implementation checks that the input is less than 0, then checks that the input is a number. But if it's not a number, the checks that it is a number will never run. So when this check needs to be failed, the code has already failed earlier on, making it pointless.

Swapping the order fixes this. This should also be a TypeError, not a ValueError.

Secondly, there is no valid case for stacking 0 or 1 frames, so the code should assert >= 2, not >0

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant