Add formatting of type parameters in class and function definitions (#6161)

Part of #5062 
Closes https://github.com/astral-sh/ruff/issues/5931

Implements formatting of a sequence of type parameters in a dedicated
struct for reuse by classes, functions, and type aliases (preparing for
#5929). Adds formatting of type parameters in class and function
definitions — previously, they were just elided.
This commit is contained in:
Zanie Blue 2023-08-02 15:29:28 -05:00 committed by GitHub
parent 9425ed72a0
commit 1a60d1e3c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 825 additions and 172 deletions

View file

@ -34,6 +34,7 @@ pub(crate) mod other;
pub(crate) mod pattern;
mod prelude;
pub(crate) mod statement;
pub(crate) mod type_param;
include!("../../ruff_formatter/shared_traits.rs");