-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
Description
The bug produces as internal error when accessing the dict returned from BeautifulSoup.find_all() method:
on: 0.991
I would rather expect an mypy error instead on an internal error.
**To Reproduce**
```python
repos = []
for url in links:
soup = BeautifulSoup(urlopen(url), "html.parser")
for link in soup.find_all("a", href=True):
repos.append(repos.append(link["href"])
Expected Behavior
I would expect some sort of mypy error.
Actual Behavior
error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
If this issue continues with mypy master, please report a bug at https://github.com/python/mypy/issues
Yet, when using the following
mypy --strict package_name/ --show-traceback
The result is
error: INTERNAL ERROR -- Please try using mypy master on GitHub:
https://mypy.readthedocs.io/en/stable/common_issues.html#using-a-development-mypy-build
Please report a bug at https://github.com/python/mypy/issues
version: 0.991
Traceback (most recent call last):
File "mypy/checkexpr.py", line 4657, in accept
File "mypy/checkexpr.py", line 410, in visit_call_expr
File "mypy/checkexpr.py", line 473, in visit_call_expr_inner
File "mypy/checkexpr.py", line 885, in try_infer_partial_type
KeyError: <mypy.nodes.Var object at 0x7f3843b28670>
Thus, I am reporting the bug.
Your Environment
- Mypy version used: 0.991
- Mypy command-line flags: --strict, --show-traceback
- Mypy configuration options from
mypy.ini
(and other config files): no special config - Python version used: 3.10