Nimblesite / Nimblesite/Basilisk
False negatives of Basilisk
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 54
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
Here are some examples of things that major other type checkers (mypy, pyright, pyrefly, ty) catch, but Basilisk does not.
-
Assigning a string to an integer variable.
x: int x = "foo" -
Calling an integer.
nonsense = 123 nonsense() -
Putting a string into a list of integers.
numbers: list[int] = [] numbers[0] = "three" -
Using an integer key in a string-keyed dictionary.
config: dict[str, int] = {} config[0] = 3 -
Passing a string to a method that expects an integer.
class C: def square(self, x: int) -> int: return x * x c = C() c.square("hello") -
Calling
lenwith the wrong number of arguments.len() len([], 1) -
Missing a required integer return value.
def f() -> int: print("hello") -
Awaiting an integer.
async def main() -> None: await 1 -
Unpacking an integer.
a, b = 1 -
Assigning a nonexistent attribute on
object.obj = object() obj.non_existing = 1 -
Indexing a list with a string.
numbers: list[int] = [] numbers["zero"] = 3 -
Storing a string in an integer-valued dictionary.
config: dict[str, int] = {} config["retries"] = "three" -
Unpacking too many values.
a, b = (1, 2, 3) -
Unpacking too few values.
a, b = (1,) -
Iterating over an integer.
nonsense = 123 for x in nonsense: pass -
Passing an integer to
json.loads.import json json.loads(5) -
Passing a string to an integer keyword parameter.
def foo(x: int, y: int, *, z: int = 0) -> int: return x * y * z foo(1, 2, z="hello") -
Using an object without context-manager methods in
with.class Manager: ... with Manager(): pass -
Indexing an object without
__getitem__.class NotSubscriptable: ... a = NotSubscriptable()[0] -
Assigning through a subscript without
__setitem__.class NoSetitem: ... a = NoSetitem() a[0] = 0 -
Assigning a string to an integer through a walrus expression.
x: int (x := "three") -
Declaring an existing integer variable as a string.
x = 1 x: str -
Replacing a class with an integer.
class C: ... C = 1 -
Calling
typewithout arguments.type() -
Passing a string among integer variadic arguments.
def foo(*numbers: int) -> int: return len(numbers) foo(1, 2, 3, "hello", 5) -
Passing a string among integer keyword arguments.
def foo(**numbers: int) -> int: return len(numbers) foo(a=1, b=2, c=3, d="hello", e=5) -
Assigning to a read-only property.
class DontAssignToMe: @property def immutable(self): ... DontAssignToMe().immutable = "changed" -
Using
yield fromon an integer.from typing import Generator def generator() -> Generator[None]: yield from 42 -
Using invalid string slice bounds.
def invalid_slice_bounds(s: str, start: float, end: float) -> str: return s[start:end] "foo"["bar":"baz"] -
Using
async withon an object without async context-manager methods.class Manager: ... async def main(): async with Manager(): pass
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
No implementation files, tests, or entry points are named. Start by locating Basilisk's type-checking diagnostics and reproduce the listed Python examples as regression cases. Done means Basilisk reports the corresponding invalid assignments, calls, accesses, unpacking, iteration, context-manager use, and argument or return-type errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100