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:
Micha Reiser 2024-03-03 16:54:24 +01:00 committed by GitHub
parent fb05d218c3
commit e725b6fdaf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
165 changed files with 551 additions and 433 deletions

View file

@ -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)
})
})
}