Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,12 @@ on:

jobs:
check:
name: "Lint"
name: "check"
runs-on: ubuntu-latest
steps:
- uses: astral-sh/ruff-action@v3
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
Comment on lines +14 to +17

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very secure, love it


- run: ./ty check . --output-format github
17 changes: 17 additions & 0 deletions try.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pow("s")

Check failure on line 1 in try.py

View workflow job for this annotation

GitHub Actions / check

ty (no-matching-overload)

try.py:1:1: no-matching-overload: No overload of function `pow` matches arguments stdlib/builtins.pyi:4239:5: info: First overload defined here info: Possible overloads for function `pow`: info: (base: int, exp: int, mod: int) -> int info: (base: int, exp: Literal[0], mod: None = None) -> Literal[1] info: (base: int, exp: Literal[1, 2, 3, 4, 5, ... omitted 20 literals], mod: None = None) -> int info: (base: int, exp: Literal[-1, -2, -3, -4, -5, ... omitted 15 literals], mod: None = None) -> int | float info: (base: int, exp: int, mod: None = None) -> Any info: (base: Literal[1, 2, 3, 4, 5, ... omitted 20 literals], exp: int | float, mod: None = None) -> int | float info: (base: Literal[-1, -2, -3, -4, -5, ... omitted 15 literals], exp: int | float, mod: None = None) -> int | float | complex info: (base: int | float, exp: int, mod: None = None) -> int | float info: (base: int | float, exp: int | float | complex | _SupportsPow2[Any, Any] | _SupportsPow3[Any, Any, Any], mod: None = None) -> Any info: (base: int | float | complex, exp: int | float | complex | _SupportsPow2[Any, Any] | _SupportsPow3[Any, Any, Any], mod: None = None) -> int | float | complex info: [_E_contra, _T_co](base: _SupportsPow2[_E_contra, _T_co], exp: _E_contra, mod: None = None) -> _T_co info: [_E_contra, _T_co](base: _SupportsPow3NoneOnly[_E_contra, _T_co], exp: _E_contra, mod: None = None) -> _T_co info: [_E_contra, _M_contra, _T_co](base: _SupportsPow3[_E_contra, _M_contra, _T_co], exp: _E_contra, mod: _M_contra) -> _T_co info: (base: _SupportsPow2[Any, Any] | _SupportsPow3[Any, Any, Any], exp: int | float, mod: None = None) -> Any info: (base: _SupportsPow2[Any, Any] | _SupportsPow3[Any, Any, Any], exp: int | float | complex, mod: None = None) -> int | float | complex info: rule `no-matching-overload` is enabled by default

def foo(x: int): ...













foo("bar")

Check failure on line 17 in try.py

View workflow job for this annotation

GitHub Actions / check

ty (invalid-argument-type)

try.py:17:5: invalid-argument-type: Argument to function `foo` is incorrect: Expected `int`, found `Literal["bar"]` try.py:3:5: info: Function defined here try.py:3:9: Parameter declared here info: rule `invalid-argument-type` is enabled by default
Binary file added ty
Binary file not shown.
Loading