Commit Graph

23 Commits

Author SHA1 Message Date
David Peter 1f1542db51
[ty] Use 3.14 as the default version (#20759)
## Summary

Bump the latest supported Python version of ty to 3.14 and updates some
references from 3.13 to 3.14.

This also fixes a bug with `dataclasses.field` on 3.14 (which adds a new
keyword-only parameter to that function, breaking our previously naive
matching on the parameter structure of that function).

## Test Plan

A `ty check` on a file with template strings (without any further
configuration) doesn't raise errors anymore.
2025-10-08 11:38:47 +02:00
Alex Waygood 42b297bf44
[ty] Improve documentation for `extra-paths` and `python` config settings (#20717)
Co-authored-by: Micha Reiser <micha@reiser.io>
2025-10-06 12:20:00 +00:00
David Peter 7ee863b6d7
[ty] Include `python` folder in `environment.root` if it exists (#20263)
## Summary

I felt it was safer to add the `python` folder *in addition* to a
possibly-existing `src` folder, even though the `src` folder only
contains Rust code for `maturin`-based projects. There might be
non-maturin projects where a `python` folder exists for other reasons,
next to a normal `src` layout.

closes https://github.com/astral-sh/ty/issues/1120

## Test Plan

Tested locally on the egglog-python project.
2025-09-05 13:53:48 +02:00
Micha Reiser 527a690a73
[ty] Fix example in environment docs (#19937) 2025-08-16 14:37:28 +00:00
Dhruv Manilawala 1ddda241f6
[ty] Add an empty line to separate bullet points (#19195)
Without the newline, the rendering would just combine all the bullet
points in a single line like in
https://docs.astral.sh/ty/reference/configuration/#exclude_1. With the
empty line, it would be similar to
https://docs.astral.sh/ty/reference/configuration/#include_1.
2025-07-08 05:10:31 +00:00
Zanie Blue 522fd4462e
Fix header levels in generated settings reference (#19089)
The headers were one level too deep for child items, and the top-level
`rules` header was way off.
2025-07-02 16:01:23 +02:00
Micha Reiser 833be2e66a
[ty] Change `environment.root` to accept multiple paths (#18913) 2025-06-24 14:52:36 +02:00
Micha Reiser 0194452928
[ty] Rename `src.root` setting to `environment.root` (#18760)
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
2025-06-24 14:40:44 +02:00
Micha Reiser 37fdece72f
[ty] Anchor all exclude patterns (#18685)
Co-authored-by: Andrew Gallant <andrew@astral.sh>
2025-06-18 08:57:36 +00:00
Micha Reiser 3a430fa6da
[ty] Allow overriding rules for specific files (#18648) 2025-06-15 14:27:39 +01:00
Micha Reiser 1f27d53fd5
[ty] File inclusion and exclusion (#18498) 2025-06-12 19:07:31 +02:00
Alex Waygood e84406d8be
[ty] Infer the Python version from `--python=<system installation>` on Unix (#18550) 2025-06-11 14:32:33 +00:00
DetachHead ae2150bfa3
[ty] document how the default value for `python-version` is determined (#18549)
Co-authored-by: detachhead <detachhead@users.noreply.github.com>
Co-authored-by: Alex Waygood <alex.waygood@gmail.com>
2025-06-09 13:32:43 +00:00
DetachHead 07cb84426d
[ty] document the `"all"` option for `python-platform` (#18548)
Co-authored-by: detachhead <detachhead@users.noreply.github.com>
2025-06-09 12:01:24 +00:00
Micha Reiser 62ef96f51e
[ty] Move `respect-ignore-files` under `src` section (#18322) 2025-05-26 18:45:48 +01:00
Jo 97ff015c88
[ty] Add `tests` to `src.root` if it exists and is not a package (#18286) 2025-05-26 09:08:57 +01:00
David Peter 6392dccd24
[ty] Add warning that docs are autogenerated (#18270)
## Summary

This is a practice I followed on previous projects. Should hopefully
further help developers who want to update the documentation.

The big downside is that it's annoying to see this *as a user of the
documentation* if you don't open the Markdown file in the browser. But
I'd argue that those files don't really follow the original Markdown
spirit anyway with all the inline HTML.
2025-05-23 09:58:16 +00:00
Micha Reiser 55a410a885
Default `src.root` to `['.', '<project_name>']` if the directory exists (#18141) 2025-05-19 18:11:27 +02:00
Micha Reiser cfbb914100
Use `https://ty.dev/rules` when linking to the rules table (#18072) 2025-05-13 19:21:06 +02:00
Micha Reiser be6ec613db
[ty] Fix incorrect type of `src.root` in documentation (#18040) 2025-05-12 12:28:14 +00:00
Micha Reiser d944a1397e
[ty] Remove brackets around option names (#18037) 2025-05-12 11:16:03 +00:00
Micha Reiser 5ecd560c6f
Link to the rules.md in the ty repository (#17979) 2025-05-10 11:40:40 +01:00
Micha Reiser 12ce445ff7
[ty] Document configuration schema (#17950) 2025-05-09 10:47:45 +02:00