Nimblesite / Nimblesite/Basilisk
calls_argument_type: literal None rejected for a `X | None` parameter
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 54
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Version
basilisk 0.35.0 (also present on 0.39.0).
What happens
Passing the literal None to a parameter declared dict[str, Any] | None is
reported as an error:
warning[calls_argument_type]: Argument `body` of `_probe` expects `dict[str, Any] | None`
but received a scalar literal where `dict[str, Any] | None` is required
— no type-variable assignment makes it valid
Minimal reproduction
from typing import Any
def probe(body: dict[str, Any] | None) -> None: ...
probe(None) # warning[calls_argument_type]
Expected
No diagnostic. None is a member of dict[str, Any] | None by definition, so
the call is well-typed.
Notes
The message calls None "a scalar literal", which suggests the argument check
is comparing the literal against the dict[str, Any] member of the union only
and never trying the None member. A non-literal None-typed variable is
accepted at the same call site, so it looks specific to the literal path.
Contributor guide
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 at the calls_argument_type argument-checking path and reproduce the minimal Python example with a literal None passed to dict[str, Any] | None. Compare this with the accepted None-typed variable case; done means the literal call produces no diagnostic while incompatible arguments remain rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100