mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-10 21:58:30 +00:00
[flake8-pyi
] Implement PYI046
(#6098)
## Summary Checks for the presence of unused private `typing.Protocol` definitions. ref #848 ## Test Plan Snapshots and manual runs of flake8.
This commit is contained in:
parent
d04367a042
commit
86539c1fc5
10 changed files with 148 additions and 4 deletions
|
@ -94,9 +94,9 @@ impl<'a> Binding<'a> {
|
|||
)
|
||||
}
|
||||
|
||||
/// Return `true` if this [`Binding`] represents an private variable
|
||||
/// Return `true` if this [`Binding`] represents an private declaration
|
||||
/// (e.g., `_x` in `_x = "private variable"`)
|
||||
pub const fn is_private_variable(&self) -> bool {
|
||||
pub const fn is_private_declaration(&self) -> bool {
|
||||
self.flags.contains(BindingFlags::PRIVATE_DECLARATION)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue