Skip to content

NSPBot911/ty-pre-commit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ruff-pre-commit

ty image image image Actions status

A pre-commit hook for ty.

Distributed as a standalone repository to enable installing ty via prebuilt wheels from pypi.

Using ty with pre-commit

To run ty's checker via pre-commit, add the following to your .pre-commit-config.yaml:

repos:
- repo: https://github.com/NSPBot911/ty-pre-commit
  # ty version.
  rev: v0.0.11
  hooks:
    # Run the linter.
    - id: ty-check

To avoid running on Jupyter Notebooks, remove jupyter from the list of allowed filetypes:

repos:
- repo: https://github.com/NSPBot911/ty-pre-commit
  # ty version.
  rev: v0.0.11
  hooks:
    # Run the linter.
    - id: ty-check
      types_or: [ python, pyi ]

License

ty-pre-commit is licensed under the MIT License, until Astral makes their own repo.