Skip to content

[ty] Generate and add rules table#17953

Merged
MichaReiser merged 4 commits intomainfrom
micha/ty-rules-table
May 8, 2025
Merged

[ty] Generate and add rules table#17953
MichaReiser merged 4 commits intomainfrom
micha/ty-rules-table

Conversation

@MichaReiser
Copy link
Member

@MichaReiser MichaReiser commented May 8, 2025

Summary

This PR adds a script to generate a markdown file documenting all known ty rules.

I plan to link to this rule table from ty's README.

Test Plan

See commited rules.md

https://github.com/astral-sh/ruff/blob/micha/ty-rules-table/crates/ty/docs/rules.md

@MichaReiser MichaReiser added documentation Improvements or additions to documentation ty Multi-file analysis & type inference labels May 8, 2025
"#,
level = lint.default_level(),
summary = lint.summary(),
encoded_name = url::form_urlencoded::byte_serialize(lint.name().as_str().as_bytes())
Copy link
Member Author

Choose a reason for hiding this comment

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

url encoding is surprisingly hard lol

Copy link
Contributor

Choose a reason for hiding this comment

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

it's like CI was reading this comment

@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2025

mypy_primer results

No ecosystem changes detected ✅

@github-actions
Copy link
Contributor

github-actions bot commented May 8, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Formatter (stable)

ℹ️ ecosystem check encountered format errors. (no format changes; 1 project error)

mesonbuild/meson-python (error)

warning: Detected debug build without --no-cache.
error: Failed to read tests/packages/symlinks/baz.py: No such file or directory (os error 2)
error: Failed to read tests/packages/symlinks/qux.py: No such file or directory (os error 2)

Formatter (preview)

ℹ️ ecosystem check encountered format errors. (no format changes; 1 project error)

mesonbuild/meson-python (error)

ruff format --preview

warning: Detected debug build without --no-cache.
error: Failed to read tests/packages/symlinks/baz.py: No such file or directory (os error 2)
error: Failed to read tests/packages/symlinks/qux.py: No such file or directory (os error 2)

@MichaReiser MichaReiser force-pushed the micha/ty-rules-table branch from 781f181 to 5a8b1fc Compare May 8, 2025 14:35
@MichaReiser MichaReiser force-pushed the micha/ty-rules-table branch from 5a8b1fc to 7eb84ce Compare May 8, 2025 14:36
@MichaReiser MichaReiser marked this pull request as ready for review May 8, 2025 14:39
Copy link
Contributor

@carljm carljm left a comment

Choose a reason for hiding this comment

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

Looks good to me! Thank you.

@MichaReiser MichaReiser merged commit 5eb215e into main May 8, 2025
35 checks passed
@MichaReiser MichaReiser deleted the micha/ty-rules-table branch May 8, 2025 14:55
dcreager added a commit that referenced this pull request May 8, 2025
* main:
  [ty] Respect the gradual guarantee when reporting errors in resolving MROs (#17962)
  Convert `Message::SyntaxError` to use `Diagnostic` internally (#17784)
  [ty] Support extending `__all__` with a literal tuple or set as well as a literal list (#17948)
  [ty] Make `unused-ignore-comment` disabled by default for now (#17955)
  [ty] Change default severity for `unbound-reference` to `error` (#17936)
  [ty] Ignore `possibly-unresolved-reference` by default (#17934)
  [ty] Default to latest supported python version (#17938)
  [ty] Generate and add rules table (#17953)
  Update the schemastore script to match changes in ty (#17952)
  [ty] Implement `global` handling and `load-before-global-declaration` syntax error (#17637)
dcreager added a commit that referenced this pull request May 8, 2025
* dcreager/default-typevars:
  clean up the diff
  remove trait
  track in type again
  clippy
  Better expansion of default typevars
  specialize_partial
  enum for TypeMapping
  [ty] Respect the gradual guarantee when reporting errors in resolving MROs (#17962)
  Specialize trait
  Convert `Message::SyntaxError` to use `Diagnostic` internally (#17784)
  [ty] Support extending `__all__` with a literal tuple or set as well as a literal list (#17948)
  [ty] Make `unused-ignore-comment` disabled by default for now (#17955)
  [ty] Change default severity for `unbound-reference` to `error` (#17936)
  [ty] Ignore `possibly-unresolved-reference` by default (#17934)
  [ty] Default to latest supported python version (#17938)
  [ty] Generate and add rules table (#17953)
  Update the schemastore script to match changes in ty (#17952)
  [ty] Implement `global` handling and `load-before-global-declaration` syntax error (#17637)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation ty Multi-file analysis & type inference

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments