mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-18 08:09:53 +00:00
Merge subsettings when extending configurations (#4431)
This commit is contained in:
parent
f70c286e6a
commit
d6930ca991
24 changed files with 197 additions and 64 deletions
|
@ -5,6 +5,7 @@ use proc_macro::TokenStream;
|
|||
use syn::{parse_macro_input, DeriveInput, ItemFn, ItemStruct};
|
||||
|
||||
mod cache_key;
|
||||
mod combine_options;
|
||||
mod config;
|
||||
mod derive_message_formats;
|
||||
mod map_codes;
|
||||
|
@ -22,6 +23,15 @@ pub fn derive_config(input: proc_macro::TokenStream) -> proc_macro::TokenStream
|
|||
.into()
|
||||
}
|
||||
|
||||
#[proc_macro_derive(CombineOptions)]
|
||||
pub fn derive_combine_options(input: proc_macro::TokenStream) -> proc_macro::TokenStream {
|
||||
let input = parse_macro_input!(input as DeriveInput);
|
||||
|
||||
combine_options::derive_impl(input)
|
||||
.unwrap_or_else(syn::Error::into_compile_error)
|
||||
.into()
|
||||
}
|
||||
|
||||
#[proc_macro_derive(CacheKey)]
|
||||
pub fn cache_key(input: TokenStream) -> TokenStream {
|
||||
let item = parse_macro_input!(input as DeriveInput);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue