---
title: "💭 Playground | Red Knot"
description: "!https://types.ruff.rs/"
date: 2025-05-02
published: true
tags:
  - python
  - thought
template: link
---


<div class="embed-card embed-card-external">
  <a href="https://types.ruff.rs/" class="embed-card-link" target="_blank" rel="noopener noreferrer">
    <div class="embed-card-image">
      <img src="/Astral.png" alt="Playground | ty — An in-browser playground for ty, an extremely fast Python type-checker written in Rust." loading="lazy">
    </div>
    <div class="embed-card-content">
      <div class="embed-card-title">Playground | ty</div>
      <div class="embed-card-description">An in-browser playground for ty, an extremely fast Python type-checker written in Rust.</div>
      <div class="embed-card-meta">types.ruff.rs</div>
    </div>
  </a>
</div>


ty, has a playground running at types.ruff.rs.  You can edit code in there and see what the type checker results would be in browser.  This looks good, excited to see it running in my lsp.

Here is an example where a Optional may not be defined.

![image](https://dropper.wayl.one/api/file/783e4d9e-8b23-4304-8921-2ae05aebcc8a.webp)

Checking for existance before using it resolves the issue.

![image](https://dropper.wayl.one/api/file/cc28335c-4130-4bf4-829d-0ff39f2aa32d.webp)

!!! note

    This post is a <a href="/thoughts/" class="wikilink" data-title="Thoughts" data-description="These are generally my thoughts on a web page or some sort of url, except a rare few don&#39;t have a link. These are dual published off of my..." data-date="2024-04-01">thought</a>. It's a short note that I make
    about someone else's content online <a href="/tags/thoughts/" class="hashtag-tag" data-tag="thoughts" data-count=2 data-reading-time=3 data-reading-time-text="3 minutes">#thoughts</a>
