Skip to content

Instantly share code, notes, and snippets.

@AlexWaygood
Created August 13, 2026 08:08
Show Gist options
  • Select an option

  • Save AlexWaygood/ecf3cf700ff4ffa8741738020d790bec to your computer and use it in GitHub Desktop.

Select an option

Save AlexWaygood/ecf3cf700ff4ffa8741738020d790bec to your computer and use it in GitHub Desktop.
{"version": 1, "file_mapping": {"pyproject.toml": "pyproject.toml", "foo.py": "foo.py"}}
from typing import Protocol
class _HasVersionFieldProtocol(Protocol):
def __getitem__(self, s: str) -> str: ...
class Foo:
def __getitem__(self, x: str) -> str:
return ""
x: _HasVersionFieldProtocol = Foo()
[project]
name = "sandbox"
version = "0.1.0"
requires-python = ">=3.10"
dependencies = []
[tool.ty]
[tool.ty.rules]
undefined-reveal = "ignore"
unsupported-dynamic-base = "error"
[tool.pyright]
reportWildcardImportFromLibrary = false
reportSelfClsParameterName = false
reportUnusedExpression = false
[tool.pyrefly]
[tool.pyrefly.errors]
unimported-directive = false
[tool.mypy]
color_output = true
pretty = true
check_untyped_defs = true
enable_error_code = "deprecated"
[tool.zuban]
pretty = true
check_untyped_defs = true
[tool.pycroscope]
import_paths = ["."]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment