Skip to content

Commit

Permalink
Replace new ones
Browse files Browse the repository at this point in the history
  • Loading branch information
T-256 authored and MichaReiser committed Jun 24, 2024
1 parent d9deff7 commit 9517dfb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions crates/ruff_macros/src/map_codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use syn::{
use crate::rule_code_prefix::{get_prefix_ident, intersection_all};

/// A rule entry in the big match statement such a
/// `(Pycodestyle, "E112") => (RuleGroup::Nursery, rules::pycodestyle::rules::logical_lines::NoIndentedBlock),`
/// `(Pycodestyle, "E112") => (RuleGroup::Preview, rules::pycodestyle::rules::logical_lines::NoIndentedBlock),`
#[derive(Clone)]
struct Rule {
/// The actual name of the rule, e.g., `NoIndentedBlock`.
Expand All @@ -20,7 +20,7 @@ struct Rule {
linter: Ident,
/// The code associated with the rule, e.g., `"E112"`.
code: LitStr,
/// The rule group identifier, e.g., `RuleGroup::Nursery`.
/// The rule group identifier, e.g., `RuleGroup::Preview`.
group: Path,
/// The path to the struct implementing the rule, e.g.
/// `rules::pycodestyle::rules::logical_lines::NoIndentedBlock`
Expand Down Expand Up @@ -368,13 +368,13 @@ fn generate_iter_impl(

quote! {
impl Linter {
/// Rules not in the nursery.
/// Rules not in the preview.
pub fn rules(self: &Linter) -> ::std::vec::IntoIter<Rule> {
match self {
#linter_rules_match_arms
}
}
/// All rules, including those in the nursery.
/// All rules, including those in the preview.
pub fn all_rules(self: &Linter) -> ::std::vec::IntoIter<Rule> {
match self {
#linter_all_rules_match_arms
Expand Down Expand Up @@ -476,7 +476,7 @@ fn register_rules<'a>(input: impl Iterator<Item = &'a Rule>) -> TokenStream {
}

impl Parse for Rule {
/// Parses a match arm such as `(Pycodestyle, "E112") => (RuleGroup::Nursery, rules::pycodestyle::rules::logical_lines::NoIndentedBlock),`
/// Parses a match arm such as `(Pycodestyle, "E112") => (RuleGroup::Preview, rules::pycodestyle::rules::logical_lines::NoIndentedBlock),`
fn parse(input: syn::parse::ParseStream) -> syn::Result<Self> {
let attrs = Attribute::parse_outer(input)?;
let pat_tuple;
Expand Down
2 changes: 1 addition & 1 deletion crates/ruff_server/src/server/api/requests/hover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ fn format_rule_text(rule: Rule) -> String {
output.push('\n');
}

if rule.is_preview() || rule.is_nursery() {
if rule.is_preview() {
output.push_str(r"This rule is in preview and is not stable.");
output.push('\n');
output.push('\n');
Expand Down

0 comments on commit 9517dfb

Please sign in to comment.