mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-23 11:55:10 +00:00
CallPath newtype wrapper (#10201)
## Summary This PR changes the `CallPath` type alias to a newtype wrapper. A newtype wrapper allows us to limit the API and to experiment with alternative ways to implement matching on `CallPath`s. ## Test Plan `cargo test`
This commit is contained in:
parent
fb05d218c3
commit
e725b6fdaf
165 changed files with 551 additions and 433 deletions
|
@ -1,6 +1,6 @@
|
|||
use ruff_python_ast::call_path::CallPath;
|
||||
use std::collections::BTreeSet;
|
||||
|
||||
use ruff_python_ast::call_path::from_qualified_name;
|
||||
use ruff_python_ast::helpers::map_callable;
|
||||
use ruff_python_semantic::{Definition, SemanticModel};
|
||||
use ruff_source_file::UniversalNewlines;
|
||||
|
@ -57,7 +57,7 @@ pub(crate) fn should_ignore_definition(
|
|||
.is_some_and(|call_path| {
|
||||
ignore_decorators
|
||||
.iter()
|
||||
.any(|decorator| from_qualified_name(decorator) == call_path)
|
||||
.any(|decorator| CallPath::from_qualified_name(decorator) == call_path)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue