Skip to content

Commit 7925735

Browse files
authored
Enable clippy::allow_attributes lint for datafusion-catalog (#18973)
## Which issue does this PR close? - Fixes part of #18881 ## Rationale for this change Replace #[allow] with #[expect] to enable automatic detection when lint suppressions are no longer needed. ## What changes are included in this PR? Replace 4 #[allow] attributes with #[expect] in datafusion-catalog - Add #![deny(clippy::allow_attributes)] lint rule to lib.rs - Convert unused_variables and clippy::too_many_arguments suppressions ## Are these changes tested? yes ## Are there any user-facing changes? No user-facing changes.
1 parent 5258352 commit 7925735

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

datafusion/catalog/src/information_schema.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,7 @@ struct InformationSchemaRoutinesBuilder {
11671167
}
11681168

11691169
impl InformationSchemaRoutinesBuilder {
1170-
#[allow(clippy::too_many_arguments)]
1170+
#[expect(clippy::too_many_arguments)]
11711171
fn add_routine(
11721172
&mut self,
11731173
catalog_name: impl AsRef<str>,
@@ -1301,7 +1301,7 @@ struct InformationSchemaParametersBuilder {
13011301
}
13021302

13031303
impl InformationSchemaParametersBuilder {
1304-
#[allow(clippy::too_many_arguments)]
1304+
#[expect(clippy::too_many_arguments)]
13051305
fn add_parameter(
13061306
&mut self,
13071307
specific_catalog: impl AsRef<str>,

datafusion/catalog/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#![cfg_attr(not(test), deny(clippy::clone_on_ref_ptr))]
2626
#![deny(clippy::needless_pass_by_value)]
2727
#![cfg_attr(test, allow(clippy::needless_pass_by_value))]
28+
#![deny(clippy::allow_attributes)]
2829

2930
//! Interfaces and default implementations of catalogs and schemas.
3031
//!

datafusion/catalog/src/schema.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub trait SchemaProvider: Debug + Sync + Send {
6868
///
6969
/// If a table of the same name was already registered, returns "Table
7070
/// already exists" error.
71-
#[allow(unused_variables)]
71+
#[expect(unused_variables)]
7272
fn register_table(
7373
&self,
7474
name: String,
@@ -81,7 +81,7 @@ pub trait SchemaProvider: Debug + Sync + Send {
8181
/// schema and returns the previously registered [`TableProvider`], if any.
8282
///
8383
/// If no `name` table exists, returns Ok(None).
84-
#[allow(unused_variables)]
84+
#[expect(unused_variables)]
8585
fn deregister_table(&self, name: &str) -> Result<Option<Arc<dyn TableProvider>>> {
8686
exec_err!("schema provider does not support deregistering tables")
8787
}

0 commit comments

Comments
 (0)