Skip to content

Instantly share code, notes, and snippets.

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

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

Select an option

Save AlexWaygood/fed8ed7b7ac864abb277fb4c127a83a2 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 NonDunderProtocol(Protocol):
def method(self, x): ...
class Bar:
def method(self, y): ...
def test(obj: NonDunderProtocol):
obj.method(x=42)
test(Bar())
[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