dask.array `_array_expr_enabled` issues with LSP's
- Dominant language
- Python
- Stars
- 13.9k
- Forks
- 2k
- PR merge metrics
- No merged PRs in 30d
Description
The import structure in the `dask.array.__init__.py` (because try: except blocks) causes issues with Pylance.

A simple solution can be acomplished in the following form, using `typing.TYPE_CHECKING`

Which resolves the issue and at runtime `not TYPE_CHECKING` will always be true.
Which results in expected IDE behavior

Contributor guide
Research direction
Start by inspecting dask.array.__init__.py and reproduce the import behavior in Pylance. Compare the try/except import structure with the reported typing.TYPE_CHECKING approach, then verify that the expected symbols resolve correctly in the IDE without changing runtime behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- developer-experience
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100