Minor adjustments to docs (#752)

This commit is contained in:
David Peter 2025-07-02 15:20:48 +02:00 committed by Zanie Blue
parent 3634c41020
commit 75af7fca4d
5 changed files with 16 additions and 15 deletions

View file

@ -2,10 +2,12 @@
The ty command line interface uses the following exit codes:
- `0` if no violations with severity `error` or higher were found.
- `1` if any violations with severity `error` were found.
- `2` if ty terminates abnormally due to invalid CLI options.
- `101` if ty terminates abnormally due to an internal error.
| Exit code | Description |
| :-------- | :------------------------------------------------------- |
| `0` | no violations with severity `error` or higher were found |
| `1` | violations with severity `error` or higher were found |
| `2` | invalid CLI options |
| `101` | internal error |
ty supports two command line arguments that change how exit codes work:

View file

@ -22,10 +22,10 @@ You can configure the level for each rule on the command line using the `--warn`
```shell
ty check \
--warn unused-ignore-comment \ # Make `unused-ignore-comment` a warning
--ignore redundant-cast \ # Disable `redundant-cast`
--error possibly-unbound-attribute \ # Error on `possibly-unbound-attribute`
--error possibly-unbound-import # Error on `possibly-unbound-import`
--warn unused-ignore-comment \ # Make `unused-ignore-comment` a warning
--ignore redundant-cast \ # Disable `redundant-cast`
--error possibly-unbound-attribute \ # Error on `possibly-unbound-attribute`
--error possibly-unbound-import # Error on `possibly-unbound-import`
```
The options can be repeated. Subsequent options override earlier options.

View file

@ -5,7 +5,7 @@ entirely) to silence false positives or permissible violations.
!!! note
To disable a rule entirely, set it to the `ignore` level as described in [rule levels](#rule-levels).
To disable a rule entirely, set it to the `ignore` level as described in [rule levels](rules.md/#rule-levels).
## ty suppression comments

View file

@ -85,21 +85,20 @@ nav:
- Introduction: index.md
- Concepts:
- Installation: installation.md
- Module discovery: modules.md
- Configuration: configuration.md
- Module discovery: modules.md
- Python version: python-version.md
- File exclusions: exclusions.md
- Rules: rules.md
- Editors: editors.md
- Suppression: suppression.md
- Python version: python-version.md
- Editors: editors.md
- Reference:
- reference/index.md
- Configuration: reference/configuration.md
- Rules: reference/rules.md
- CLI: reference/cli.md
- Exit codes: reference/exit-codes.md
- Configuration: reference/configuration.md
- Editor settings: reference/editor-settings.md
- Environment variables: reference/env.md
- Editor settings: reference/editor-settings.md
validation:
omitted_files: warn
absolute_links: warn