python-poetry / python-poetry/tomlkit
function with argument of type`Item` should be compatible with `Table`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 850
- Forks
- 162
- Avg merge
- 13m
- Merged PRs (30d)
- 2
Description
Error:
Argument 2 to "add" of "Container" has incompatible type "Table"; expected "Optional[Item]"
However, in the source code of Item, it indicates it can be a Table.
It should allow me to pass a Table to .add().
Version 0.7.2
Python 3.7.2
mypy: 0.790
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in items.py around the linked Item definition and inspect the Container.add entry point and its type annotations. Reproduce the reported mypy error with Python 3.7.2 and mypy 0.790; done means mypy accepts passing a Table to add without the incompatible-type error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100