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 mypy error: Module "ray" does not explicitly export attribute "remote" #36356

Merged
merged 1 commit into from
Jun 13, 2023

Conversation

raulchen
Copy link
Contributor

Cherry-pick #36334 to 2.5.1

…mote" (ray-project#36334)

ray-project#34730 changed `__all__` in `__init__.py` to a computed list. mypy doesn't support this. Reverting it back to a literal list to fix this issue.

Repro:
`mypy --strict --follow-imports=skip --ignore-missing-imports 1.py`

```python
# 1.py
import ray

@ray.remote
def foo() -> None:
    pass
```

Note, the reason why CI didn't catch this issue is because we don't enable strict mode, see [here](https://github.com/ray-project/ray/blob/407062499038344b0f3edb54b2c7985c3320d1ec/ci/lint/format.sh#L135). Currently we have too many issues if enabling strict mode. 

Signed-off-by: Hao Chen <chenh1024@gmail.com>
@raulchen raulchen added the release-blocker P0 Issue that blocks the release label Jun 13, 2023
@can-anyscale can-anyscale merged commit a03efd9 into ray-project:releases/2.5.1 Jun 13, 2023
@raulchen raulchen deleted the cp-fix-mypy branch June 13, 2023 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release-blocker P0 Issue that blocks the release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants