8000 fix(config): typing correction on config.py by LumenYoung · Pull Request #1320 · huggingface/lerobot · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(config): typing correction on config.py #1320

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

LumenYoung
Copy link

Although not affecting the execution, the typing in some of the fields in config.py are actually wrong.

For example, the task field in subclass of EnvConfig are typed inconsistently, leading the basedpyright warning:

basedpyright: "task" overrides symbol of same name in class "EnvConfig"
Variable is mutable so its type is invariant
Override type "str" is not the same as base type "str | None"
[reportIncompatibleVariableOverride]

Secondly, the override of gym_kwargs in HILSerlRobotEnvConfig miss the property decorator, leading the following linter problem:

basedpyright: "gym_kwargs" incorrectly overrides property of same name
in class "EnvConfig" [reportIncompatibleMethodOverride]

This commit enforces more strict typing on this file.

LumenYoung and others added 2 commits June 16, 2025 11:26
Although not affecting the execution, the typing in some  of  the fields
in Config are actually wrong.

For example, the task field in subclass of `EnvConfig` are typed
inconsistently, leading the basedpyright warning:

```
basedpyright: "task" overrides symbol of same name in class "EnvConfig"
Variable is mutable so its type is invariant
Override type "str" is not the same as base type "str | None"
[reportIncompatibleVariableOverride]
```

Secondly, the override of `gym_kwargs` in `HILSerlRobotEnvConfig` miss
the property decorator, leading the following linter problem:

```
basedpyright: "gym_kwargs" incorrectly overrides property of same name
in class "EnvConfig" [reportIncompatibleMethodOverride]
```

This commit enforces more strict typing on this file.
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
0