Added pyright to pre-commit and fixed errors such as :
Unbounded variables due to compound if statements.
Solved None variable initialization with type annotation.
Set the agent_pos attribute type to numpy.array for consistency. Environments with a fixed initial agent_pos assigned a tuple and when stepping this was converted to numpy.array.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] This change requires a documentation update
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist:
[x] I have run the pre-commit checks with pre-commit run --all-files (see CONTRIBUTING.md instructions to set it up)
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] 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
Description
Added pyright to pre-commit and fixed errors such as :
None
variable initialization with type annotation.agent_pos
attribute type tonumpy.array
for consistency. Environments with a fixed initialagent_pos
assigned atuple
and when stepping this was converted tonumpy.array
.Fixes # (issue)
Type of change
Please delete options that are not relevant.
Screenshots
Please attach before and after screenshots of the change if applicable.
Checklist:
pre-commit
checks withpre-commit run --all-files
(seeCONTRIBUTING.md
instructions to set it up)