Giter Site home page Giter Site logo

decorator-factory / pyright-playground Goto Github PK

View Code? Open in Web Editor NEW
20.0 1.0 0.0 243 KB

Try Pyright in your browser

Home Page: https://pyright-playground.decorator-factory.su/

License: MIT License

HTML 1.04% JavaScript 6.37% Svelte 17.74% TypeScript 34.11% Python 38.05% Dockerfile 2.69%
python type-checking pyright

pyright-playground's Introduction

๐Ÿ’€ Deprecation notice

There is now an official Pyright Playground: https://pyright-play.net/

Use that instead!

Pyright playground

Small website that lets you play around with pyright -- a type checker for Python -- online.

I started this yesterday as of writing this, so it's really basic.

See it in action here: Pyright playground

Demonstration

Using a source

You can share a code snippet inside the playground. We currently support loading code from a GitHub issue, from a Gist and directly from a string.

GitHub issue

In this mode, the playground will load the first Python code block (enclosed within ```py ... ```) in an issue

Example: https://pyright-playground.decorator-factory.su/?issue=microsoft/pyright/2662

Gist

In this mode, the playground will load a file from a GitHub Gist.

Example: https://pyright-playground.decorator-factory.su/?gist_id=b00b00716dbc9b2115693a1ac8c7db54&filename=example.py

This will render this gist: https://gist.github.com/decorator-factory/b00b00716dbc9b2115693a1ac8c7db54

Directly from a string

You can provide a string compressed with gzip, encoded in url-safe base64 (base64.urlsafe_b64encode in Python)

Example: https://pyright-playground.decorator-factory.su/?gzip=H4sIAPHOr2EC_zXHPQqAMAwG0D2n-OjUgl6goKcI7oKNdOgPMUJ7eyff9kRbgc2e641celMDz56OU4kY2x_v2AWiKwnEWwQvGBG5WsC64zGNBGiyVyvGBxBan4hUAAAA

TODO:

  • FEATURE: Python version picker
  • FEATURE: Pyright version picker
  • FEATURE: add general Pyright configuration
  • FEATURE: see if it's possible to display tooltips on hover?
  • FEATURE: save snippet to a gist/custom pastebin, like in mypy-play.net
  • BUG: fix newline display in tooltips
  • BUG: fix squiggly lines not showing up if the error is at the end of the file

Disclaimer

This project is not run by Microsoft or the Pyright team

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.