Home
About
Blog
Products
Forum
Support
Contact
Sunbelt Computer Software
PL/B Language Development and Support
Home
About
Blog
Products
Forum
Support
Contact
Python/.github/workflows/ty.yml at master · apow/Python · GitHub
Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
apow
/
Python
Public
forked from
TheAlgorithms/Python
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Files
Expand file tree
master
Breadcrumbs
Python
/
.github
/
workflows
/
ty.yml
Copy path
View runs
Blame
More file actions
Blame
More file actions
Latest commit
History
History
History
53 lines (53 loc) · 2.67 KB
master
Breadcrumbs
Python
/
.github
/
workflows
/
ty.yml
Copy path
Top
File metadata and controls
Code
Blame
53 lines (53 loc) · 2.67 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#
https://docs.astral.sh/ty/
name
:
ty
on
:
push
:
branches
:
-
master
pull_request
:
branches
:
-
master
jobs
:
ty
:
runs-on
:
ubuntu-latest
#
Informational only: ty is not yet a required gate. This job surfaces
#
type-check findings in the logs so they can be triaged into gradual
#
[tool.ty] rules without blocking merges. Flip `continue-on-error` to
#
false once the baseline is clean.
continue-on-error
:
true
steps
:
-
uses
:
actions/checkout@v7
with
:
persist-credentials
:
false
-
uses
:
astral-sh/setup-uv@v7
with
:
enable-cache
:
true
cache-dependency-glob
:
uv.lock
#
Mirror the `build` job: `uv sync` installs the dependencies without
#
building this flat-layout repo as a wheel. pyproject.toml has no
#
[build-system], so uv treats the project as virtual and installs only
#
its dependencies -- no "Multiple top-level packages discovered in a
#
flat-layout" error and no need for a src-layout. (`uv pip install .`
#
would force that wheel build and fail.) Pin a regular GIL 3.14 so typed
#
third-party dependencies resolve; the free-threaded 3.14t interpreter the
#
test matrix uses lacks wheels for several of them. ty itself is pulled in
#
ephemerally with `--with` so it needn't be added to the lockfile.
-
run
:
uv sync --python 3.14
#
Pin the *run* to the same regular-GIL 3.14 too. Without `--python 3.14`
#
here, `uv run` re-resolved the project's default interpreter -- the
#
free-threaded 3.14t used by the test matrix -- so ty type-checked against
#
an env where many third-party stubs don't resolve, drowning real findings
#
in `unresolved-import` / `unresolved-attribute` noise. Pinning 3.14 lets
#
ty see the synced dependencies, so the `[tool.ty.rules]` severities in
#
pyproject.toml apply to a meaningful baseline.
#
#
`--exit-zero` is ty's native advisory switch (the analog of ruff's
#
`ruff check --exit-zero`): the step always exits 0, yet with
#
`--output-format=github` ty still emits ::error annotations that render
#
inline on the diff, so findings stay visible without a red X. Promotion
#
path: `--exit-zero` (informational, always green) -> `--exit-zero-on-warning`
#
(fail only on error-severity, tolerate warnings) -> drop the flag entirely
#
to make ty a required gate once the [tool.ty] baseline is clean.
#
`continue-on-error: true` above stays as a belt-and-suspenders guard so a
#
ty *crash* (not a diagnostic) can never block a merge either.
-
run
:
uv run --python 3.14 --with ty ty check --output-format=github --exit-zero
You can’t perform that action at this time.