ruff/crates/ruff_linter
Carl Meyer c80b9a4a90
Reduce size of Stmt from 144 to 120 bytes (#11051)
## Summary

I happened to notice that we box `TypeParams` on `StmtClassDef` but not
on `StmtFunctionDef` and wondered why, since `StmtFunctionDef` is bigger
and sets the size of `Stmt`.

@charliermarsh found that at the time we started boxing type params on
classes, classes were the largest statement type (see #6275), but that's
no longer true.

So boxing type-params also on functions reduces the overall size of
`Stmt`.

## Test Plan

The `<=` size tests are a bit irritating (since their failure doesn't
tell you the actual size), but I manually confirmed that the size is
actually 120 now.
2024-04-19 17:02:17 -06:00
..
resources [`ruff]` Ignore stub functions in `unused-async` (`RUF029`) (#11026) 2024-04-19 00:03:52 -04:00
src Reduce size of Stmt from 144 to 120 bytes (#11051) 2024-04-19 17:02:17 -06:00
Cargo.toml Bump version to 0.4.1 (#11035) 2024-04-19 17:42:02 +05:30
__init__.py [`pylint`] (Re-)Implement `import-private-name` (`C2701`) (#9553) 2024-01-16 14:03:11 -05:00