facebook / facebook/pyrefly

Don't show @_ in the error message

Open
#2,206 6 comments 0 reactions 0 assignees View on GitHub
needs-discussion readability stale
Dominant language
Rust
Stars
7k
Forks
516
PR merge metrics
No merged PRs in 30d

Description

### Describe the Bug

```
Attribute `__iter__` has incompatible types: `Generator[LLMResultChunkWithStructuredOutput, None, None] | LLMResultWithStructuredOutput.__iter__` has type `BoundMethod[LLMResultWithStructuredOutput, (self: LLMResultWithStructuredOutput) -> Generator[tuple[str, Any], None, None]]`, which is not assignable to `BoundMethod[Generator[LLMResultChunkWithStructuredOutput, None, None] | LLMResultWithStructuredOutput, (self: Generator[LLMResultChunkWithStructuredOutput, None, None] | LLMResultWithStructuredOutput) -> Generator[@_, @_, @_]]`, the type of `Generator.__iter__`
```

it comes from

```
--> core/plugin/backwards_invocation/model.py:124:33
|
124 | if isinstance(response, Generator):
| ^^^^^^^^^
|
```

in https://github.com/langgenius/dify, in case someone needed.

### Sandbox Link

_No response_

### (Only applicable for extension issues) IDE Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.