<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Basilisk — The Open-Source Pylance Replacement</title>
  <subtitle>A complete Python language server and VS Code extension that replaces Pylance and Pyright. Everything Pylance does — and more. Strict by default. Built in Rust.</subtitle>
  <link href="https://www.basilisk-python.dev/feed.xml" rel="self"/>
  <link href="https://www.basilisk-python.dev/"/>
  <updated>2026-03-13T21:43:40Z</updated>
  <id>https://www.basilisk-python.dev/</id>
  
  <entry>
    <title>Introducing Basilisk: Python&#39;s Type System, Actually Enforced</title>
    <link href="https://www.basilisk-python.dev/blog/introducing-basilisk/"/>
    <id>https://www.basilisk-python.dev/blog/introducing-basilisk/</id>
    <updated>2026-02-28T00:00:00Z</updated>
    <content type="html">https://www.basilisk-python.dev/%3Ch1%20id=%22introducing-basilisk-pythons-type-system-actually-enforced%22%20tabindex=%22-1%22%3E%3Ca%20class=%22header-anchor%22%20href=%22#introducing-basilisk-pythons-type-system-actually-enforced%22%3EIntroducing%20Basilisk:%20Python&#39;s%20Type%20System,%20Actually%20Enforced%3C/a%3E%3C/h1%3E%3Cp%3EThe%20Python%20type%20annotation%20ecosystem%20has%20a%20dirty%20secret:%20nobody%20enforces%20it%20by%20default.%3C/p%3E%3Cp%3EPEP%20484%20landed%20in%202015.%20In%20the%20decade%20since,%20the%20ecosystem%20built%20sophisticated%20tools%20%E2%80%94%20Pyright,%20mypy,%20ty,%20Pyrefly%20%E2%80%94%20capable%20of%20catching%20real%20bugs%20when%20pointed%20at%20fully-typed%20code.%20The%20Python%20Typing%20Council%20published%20spec%20after%20spec.%20The%20%3Ccode%3Etyping%3C/code%3E%20module%20grew%20to%20cover%20generics,%20protocols,%20TypeVarTuple,%20ParamSpec,%20TypeIs,%20and%20more.%3C/p%3E%3Cp%3EAnd%20yet:%2088%%20of%20Python%20developers%20use%20type%20hints%20&amp;quot;always&amp;quot;%20or%20&amp;quot;often&amp;quot;%20%E2%80%94%20but%20nearly%2030%%20of%20those%20developers%20have%20no%20type%20checking%20in%20their%20CI%20pipeline%20at%20all%20(%3Ca%20href=%22https://engineering.fb.com/2024/12/09/developer-tools/typed-python-2024-survey-meta/%22%3EMeta/Microsoft%20Python%20Typing%20Survey%202024%3C/a%3E).%20The%20most%20popular%20type%20checker%20in%20VS%20Code%20defaults%20to%20a%20mode%20where%20untyped%20functions%20pass%20silently.%3C/p%3E%3Cp%3EWhy?%20Because%20every%20tool%20treats%20strictness%20as%20optional.%3C/p%3E%3Ch2%20id=%22the-typescript-lesson%22%20tabindex=%22-1%22%3E%3Ca%20class=%22header-anchor%22%20href=%22#the-typescript-lesson%22%3EThe%20TypeScript%20lesson%3C/a%3E%3C/h2%3E%3Cp%3ETypeScript%20didn&#39;t%20make%20JavaScript%20slower%20or%20more%20constrained.%20It%20made%20large%20JavaScript%20codebases%20maintainable.%20It%20achieved%20this%20not%20through%20clever%20engineering%20alone,%20but%20through%20a%20design%20philosophy:%20%3Cstrong%3Etypes%20are%20the%20default%3C/strong%3E.%20You%20have%20to%20explicitly%20opt%20out%20of%20type%20checking,%20not%20opt%20into%20it.%3C/p%3E%3Cp%3EThe%20result%20is%20that%20TypeScript%20adoption%20follows%20a%20different%20curve%20than%20Python%20typing%20adoption.%20Once%20a%20team%20uses%20TypeScript%20at%20all,%20the%20entire%20codebase%20tends%20to%20be%20typed.%20There&#39;s%20no%20gradual%20drift%20back%20to%20untyped%20code%20because%20the%20tooling%20doesn&#39;t%20encourage%20it.%3C/p%3E%3Cp%3EPython&#39;s%20typing%20tools%20took%20the%20opposite%20approach.%20%3Ca%20href=%22https://microsoft.github.io/pyright/#/configuration?id=type-check-diagnostics-settings%22%3EFour%20modes%20in%20Pyright%3C/a%3E:%20%3Ccode%3Eoff%3C/code%3E,%20%3Ccode%3Ebasic%3C/code%3E,%20%3Ccode%3Estandard%3C/code%3E,%20%3Ccode%3Estrict%3C/code%3E.%20The%20default%20is%20not%20%3Ccode%3Estrict%3C/code%3E.%20Most%20teams%20never%20change%20the%20default.%3C/p%3E%3Ch2%20id=%22what-every-other-tool-gets-wrong%22%20tabindex=%22-1%22%3E%3Ca%20class=%22header-anchor%22%20href=%22#what-every-other-tool-gets-wrong%22%3EWhat%20every%20other%20tool%20gets%20wrong%3C/a%3E%3C/h2%3E%3Cp%3EThe%20problem%20isn&#39;t%20technical%20capability.%20Pyright,%20at%20%3Ca%20href=%22https://github.com/python/typing/blob/main/conformance/results/results.html%22%3E~99%%20PEP%20conformance%3C/a%3E,%20is%20genuinely%20excellent%20at%20finding%20type%20errors%20when%20configured%20correctly.%20The%20problem%20is%20the%20default.%3C/p%3E%3Cp%3EWhen%20strictness%20is%20opt-in:%3C/p%3E%3Cul%3E%3Cli%3ENew%20projects%20start%20without%20it%20because%20there&#39;s%20no%20immediate%20pressure%20to%20add%20it%3C/li%3E%3Cli%3EExisting%20projects%20never%20add%20it%20because%20the%20error%20count%20on%20day%20one%20is%20discouraging%3C/li%3E%3Cli%3ECI%20scripts%20omit%20the%20%3Ccode%3E--strict%3C/code%3E%20flag%20because%20it%20wasn&#39;t%20there%20when%20the%20script%20was%20written%3C/li%3E%3Cli%3ENew%20team%20members%20don&#39;t%20know%20to%20add%20it%3C/li%3E%3Cli%3EThe%20flag%20gets%20dropped%20when%20deadlines%20approach%3C/li%3E%3C/ul%3E%3Cp%3EThe%20result%20is%20a%20codebase%20that%20%3Cem%3Eappears%3C/em%3E%20to%20be%20using%20type%20checking%20but%20is%20actually%20running%20in%20a%20mode%20that%20allows%20the%20majority%20of%20type%20errors%20to%20pass%20silently.%3C/p%3E%3Ch2%20id=%22basilisks-position%22%20tabindex=%22-1%22%3E%3Ca%20class=%22header-anchor%22%20href=%22#basilisks-position%22%3EBasilisk&#39;s%20position%3C/a%3E%3C/h2%3E%3Cp%3EBasilisk%20is%20strict%20by%20default.%20There%20is%20no%20permissive%20mode.%20There%20is%20no%20%3Ccode%3E--strict%3C/code%3E%20flag%20to%20forget%20to%20pass.%20There%20is%20one%20mode:%20every%20parameter%20must%20be%20typed,%20every%20return%20type%20must%20be%20declared,%20%3Ccode%3EAny%3C/code%3E%20must%20always%20be%20explicit.%3C/p%3E%3Cp%3EThis%20is%20not%20about%20making%20Python%20developers&#39;%20lives%20harder.%20It&#39;s%20about%20making%20the%20safe%20path%20the%20default%20path.%20When%20strictness%20is%20the%20default,%20type%20coverage%20naturally%20increases%20as%20teams%20add%20new%20code.%20There&#39;s%20nothing%20to%20remember%20to%20turn%20on.%3C/p%3E%3Cp%3EAdopting%20Basilisk%20on%20an%20existing%20codebase%20does%20require%20work%20%E2%80%94%20but%20it&#39;s%20work%20that%20surfaces%20real%20bugs.%20Every%20BSK-E0001%20is%20a%20function%20where%20the%20type%20contract%20was%20never%20defined.%20Every%20BSK-E0040%20is%20a%20mutation%20that%20the%20caller%20never%20agreed%20to.%20The%20errors%20Basilisk%20reports%20are%20not%20false%20positives%20%E2%80%94%20they%20are%20places%20where%20the%20type%20system%20was%20not%20being%20used.%3C/p%3E%3Ch2%20id=%22the-mojo-insight%22%20tabindex=%22-1%22%3E%3Ca%20class=%22header-anchor%22%20href=%22#the-mojo-insight%22%3EThe%20Mojo%20insight%3C/a%3E%3C/h2%3E%3Cp%3E%3Ca%20href=%22https://www.modular.com/mojo%22%3EMojo%3C/a%3E%20is%20a%20superset%20of%20Python%20that%20adds%20systems%20programming%20features:%20ownership%20semantics,%20immutability%20by%20default,%20zero%20implicit%20coercion.%20Its%20function%20model%20distinguishes%20between%20%3Ccode%3Eborrowed%3C/code%3E,%20%3Ccode%3Einout%3C/code%3E,%20and%20%3Ccode%3Eowned%3C/code%3E%20parameters%20at%20the%20language%20level.%3C/p%3E%3Cp%3EBasilisk%20borrows%20(no%20pun%20intended)%20these%20concepts%20and%20implements%20them%20as%20static%20analysis%20over%20standard%20Python%20syntax.%20Using%20%3Ccode%3EAnnotated%3C/code%3E%20from%20the%20%3Ccode%3Etyping%3C/code%3E%20module:%3C/p%3E%3Cpre%20class=%22language-python%22%3E%3Ccode%20class=%22language-python%22%3E%3Cspan%20class=%22token%20keyword%22%3Efrom%3C/span%3E%20typing%20%3Cspan%20class=%22token%20keyword%22%3Eimport%3C/span%3E%20Annotated%3Cspan%20class=%22token%20keyword%22%3Efrom%3C/span%3E%20basilisk%20%3Cspan%20class=%22token%20keyword%22%3Eimport%3C/span%3E%20Borrowed%3Cspan%20class=%22token%20punctuation%22%3E,%3C/span%3E%20InOut%3Cspan%20class=%22token%20punctuation%22%3E,%3C/span%3E%20Owned%3Cspan%20class=%22token%20keyword%22%3Edef%3C/span%3E%20%3Cspan%20class=%22token%20function%22%3Esummarise%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E(%3C/span%3Eitems%3Cspan%20class=%22token%20punctuation%22%3E:%3C/span%3E%20Annotated%3Cspan%20class=%22token%20punctuation%22%3E[%3C/span%3E%3Cspan%20class=%22token%20builtin%22%3Elist%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E[%3C/span%3E%3Cspan%20class=%22token%20builtin%22%3Eint%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E]%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E,%3C/span%3E%20Borrowed%3Cspan%20class=%22token%20punctuation%22%3E]%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E)%3C/span%3E%20%3Cspan%20class=%22token%20operator%22%3E-%3C/span%3E%3Cspan%20class=%22token%20operator%22%3E%3E%3C/span%3E%20%3Cspan%20class=%22token%20builtin%22%3Eint%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E:%3C/span%3E%20%20%20%20%3Cspan%20class=%22token%20keyword%22%3Ereturn%3C/span%3E%20%3Cspan%20class=%22token%20builtin%22%3Esum%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E(%3C/span%3Eitems%3Cspan%20class=%22token%20punctuation%22%3E)%3C/span%3E%20%20%3Cspan%20class=%22token%20comment%22%3E#%20read-only%20%E2%80%94%20OK%3C/span%3E%3Cspan%20class=%22token%20keyword%22%3Edef%3C/span%3E%20%3Cspan%20class=%22token%20function%22%3Eappend_value%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E(%3C/span%3E%20%20%20%20items%3Cspan%20class=%22token%20punctuation%22%3E:%3C/span%3E%20Annotated%3Cspan%20class=%22token%20punctuation%22%3E[%3C/span%3E%3Cspan%20class=%22token%20builtin%22%3Elist%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E[%3C/span%3E%3Cspan%20class=%22token%20builtin%22%3Eint%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E]%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E,%3C/span%3E%20InOut%3Cspan%20class=%22token%20punctuation%22%3E]%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E,%3C/span%3E%20%20%20%20value%3Cspan%20class=%22token%20punctuation%22%3E:%3C/span%3E%20%3Cspan%20class=%22token%20builtin%22%3Eint%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E,%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E)%3C/span%3E%20%3Cspan%20class=%22token%20operator%22%3E-%3C/span%3E%3Cspan%20class=%22token%20operator%22%3E%3E%3C/span%3E%20%3Cspan%20class=%22token%20boolean%22%3ENone%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E:%3C/span%3E%20%20%20%20items%3Cspan%20class=%22token%20punctuation%22%3E.%3C/span%3Eappend%3Cspan%20class=%22token%20punctuation%22%3E(%3C/span%3Evalue%3Cspan%20class=%22token%20punctuation%22%3E)%3C/span%3E%20%20%3Cspan%20class=%22token%20comment%22%3E#%20mutation%20declared%20%E2%80%94%20OK%3C/span%3E%3Cspan%20class=%22token%20keyword%22%3Edef%3C/span%3E%20%3Cspan%20class=%22token%20function%22%3Econsume_and_sort%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E(%3C/span%3Eitems%3Cspan%20class=%22token%20punctuation%22%3E:%3C/span%3E%20Annotated%3Cspan%20class=%22token%20punctuation%22%3E[%3C/span%3E%3Cspan%20class=%22token%20builtin%22%3Elist%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E[%3C/span%3E%3Cspan%20class=%22token%20builtin%22%3Eint%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E]%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E,%3C/span%3E%20Owned%3Cspan%20class=%22token%20punctuation%22%3E]%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E)%3C/span%3E%20%3Cspan%20class=%22token%20operator%22%3E-%3C/span%3E%3Cspan%20class=%22token%20operator%22%3E%3E%3C/span%3E%20%3Cspan%20class=%22token%20builtin%22%3Elist%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E[%3C/span%3E%3Cspan%20class=%22token%20builtin%22%3Eint%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E]%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E:%3C/span%3E%20%20%20%20items%3Cspan%20class=%22token%20punctuation%22%3E.%3C/span%3Esort%3Cspan%20class=%22token%20punctuation%22%3E(%3C/span%3E%3Cspan%20class=%22token%20punctuation%22%3E)%3C/span%3E%20%20%20%20%3Cspan%20class=%22token%20keyword%22%3Ereturn%3C/span%3E%20items%20%20%3Cspan%20class=%22token%20comment%22%3E#%20ownership%20transferred%20%E2%80%94%20caller%20cannot%20use%20items%20after%20this%3C/span%3E%3C/code%3E%3C/pre%3E%3Cp%3EThese%20annotations%20are%20not%20runtime%20constructs.%20They%20are%20statically%20verified%20by%20Basilisk.%20Code%20that%20passes%20these%20checks%20is%20structurally%20compatible%20with%20Mojo&#39;s%20type%20expectations%20%E2%80%94%20your%20Python%20codebase%20can%20become%20Mojo-ready%20without%20waiting%20for%20a%20Mojo%20compiler.%3C/p%3E%3Ch2%20id=%22why-rust%22%20tabindex=%22-1%22%3E%3Ca%20class=%22header-anchor%22%20href=%22#why-rust%22%3EWhy%20Rust%3C/a%3E%3C/h2%3E%3Cp%3EBasilisk%20is%20implemented%20in%20Rust%20and%20ships%20as%20a%20single%20binary%20with%20no%20runtime%20dependencies.%3C/p%3E%3Cp%3EThe%20alternative%20%E2%80%94%20implementing%20a%20Python%20type%20checker%20in%20Python%20%E2%80%94%20has%20a%20fundamental%20problem:%20it%20requires%20a%20Python%20interpreter%20to%20run.%20In%20a%20CI%20environment%20that%20might%20be%20running%20Docker%20images,%20GitHub%20Actions%20runners,%20or%20edge%20build%20systems,%20adding%20a%20Python%20runtime%20dependency%20just%20to%20check%20Python%20types%20is%20unnecessary%20overhead.%3C/p%3E%3Cp%3EMore%20importantly,%20Rust&#39;s%20ownership%20model%20and%20zero-cost%20abstractions%20make%20it%20possible%20to%20implement%20the%20incremental%20computation%20Basilisk%20needs.%20We%20use%20%3Ca%20href=%22https://github.com/salsa-rs/salsa%22%3ESalsa%3C/a%3E%20%E2%80%94%20the%20same%20incremental%20computation%20framework%20that%20powers%20rust-analyzer%20%E2%80%94%20to%20achieve%20sub-10ms%20incremental%20type%20checks.%20When%20you%20edit%20a%20single%20file,%20Basilisk%20recomputes%20only%20the%20affected%20analysis%20results.%20The%20rest%20stays%20cached.%3C/p%3E%3Cp%3EThe%20result:%20keystroke-responsive%20type%20checking%20that%20doesn&#39;t%20require%20a%20persistent%20daemon,%20doesn&#39;t%20consume%20gigabytes%20of%20memory%20on%20large%20codebases,%20and%20doesn&#39;t%20slow%20down%20as%20your%20codebase%20grows.%3C/p%3E%3Ch2%20id=%22what-exists-today%22%20tabindex=%22-1%22%3E%3Ca%20class=%22header-anchor%22%20href=%22#what-exists-today%22%3EWhat%20exists%20today%3C/a%3E%3C/h2%3E%3Cp%3EBasilisk%20v0.1.0%20implements%20Phase%201%20of%20a%20seven-phase%20roadmap.%3C/p%3E%3Cp%3E%3Cstrong%3EWorking%20today:%3C/strong%3E%3C/p%3E%3Cul%3E%3Cli%3ECore%20parser,%20name%20resolver,%20and%20type%20checker%3C/li%3E%3Cli%3EAll%20E0001%E2%80%93E0025%20diagnostic%20rules%3C/li%3E%3Cli%3ECLI:%20%3Ccode%3Ebasilisk%20check%20[path]%3C/code%3E%3C/li%3E%3Cli%3Erustc-style%20error%20output%20with%20location,%20caret,%20help,%20and%20documentation%20links%3C/li%3E%3Cli%3EExit%20code%201%20on%20errors%20for%20CI%20integration%3C/li%3E%3Cli%3ERecursive%20directory%20checking%3C/li%3E%3C/ul%3E%3Cp%3E%3Cstrong%3EIn%20active%20development:%3C/strong%3E%3C/p%3E%3Cul%3E%3Cli%3ELanguage%20Server%20Protocol%20(LSP)%20server%3C/li%3E%3Cli%3EVS%20Code%20extension%3C/li%3E%3Cli%3ENeovim%20configuration%3C/li%3E%3C/ul%3E%3Cp%3E%3Cstrong%3EOn%20the%20roadmap:%3C/strong%3E%3C/p%3E%3Cul%3E%3Cli%3EPhase%203:%2080%%20PEP%20coverage,%20%3Ccode%3Ebasilisk%20migrate%3C/code%3E,%20migration%20mode%3C/li%3E%3Cli%3EPhase%204:%20Mojo%20safety%20annotations%20(ownership,%20immutability,%20coercion)%3C/li%3E%3Cli%3EPhase%205:%20WASM%20plugin%20system,%20Django/Pydantic/SQLAlchemy%20plugins,%20auto-stub%20generation%3C/li%3E%3Cli%3EPhase%206:%2095%+%20PEP%20coverage,%20SARIF/JUnit%20output,%20enterprise%20hardening%3C/li%3E%3Cli%3EPhase%207:%20Plugin%20marketplace,%20community%20stubs,%20ecosystem%3C/li%3E%3C/ul%3E%3Ch2%20id=%22try-it%22%20tabindex=%22-1%22%3E%3Ca%20class=%22header-anchor%22%20href=%22#try-it%22%3ETry%20it%3C/a%3E%3C/h2%3E%3Cpre%20class=%22language-bash%22%3E%3Ccode%20class=%22language-bash%22%3E%3Cspan%20class=%22token%20function%22%3Egit%3C/span%3E%20clone%20https://github.com/MelbourneDeveloper/Basilisk%3Cspan%20class=%22token%20builtin%20class-name%22%3Ecd%3C/span%3E%20basilisk%3Cspan%20class=%22token%20function%22%3Ecargo%3C/span%3E%20build%20%3Cspan%20class=%22token%20parameter%20variable%22%3E--release%3C/span%3E./target/release/basilisk%20check%20examples/bad.py%3C/code%3E%3C/pre%3E%3Cp%3EIf%20you%20want%20to%20see%20the%20diagnostics%20in%20action,%20the%20repository%20includes%20%3Ccode%3Eexamples/bad.py%3C/code%3E%20(with%20intentional%20errors),%20%3Ccode%3Eexamples/good.py%3C/code%3E%20(clean),%20and%20%3Ccode%3Eexamples/mixed.py%3C/code%3E%20(realistic%20mixed%20case).%3C/p%3E%3Cp%3EFile%20issues%20on%20%3Ca%20href=%22https://github.com/MelbourneDeveloper/Basilisk/issues%22%3EGitHub%3C/a%3E.%20The%20specification%20is%20in%20%3Ccode%3ESPEC.md%3C/code%3E%20if%20you%20want%20to%20understand%20the%20full%20design.%3C/p%3E%3Cp%3EPython%20type%20annotations%20have%20been%20optional%20for%20ten%20years.%20It&#39;s%20time%20they%20weren&#39;t.%3C/p%3E</content>
    <summary>Python has had type annotations for ten years. It&#39;s time someone enforced them by default.</summary>
  </entry>
</feed>
