mirror of
https://github.com/astral-sh/ruff.git
synced 2025-11-19 20:24:27 +00:00
[syntax-errors] Name is parameter and global (#20426)
## Summary <!-- What's the purpose of the change? What does it do, and why? --> This PR implements a new semantic syntax error where name is parameter & global. ## Test Plan <!-- How was it tested? --> I have written inline test as directed in #17412 --------- Signed-off-by: 11happy <soni5happy@gmail.com> Co-authored-by: Brent Westbrook <36778786+ntBre@users.noreply.github.com>
This commit is contained in:
parent
e1cada1ec3
commit
3dd78e711e
6 changed files with 143 additions and 0 deletions
|
|
@ -575,6 +575,10 @@ impl SemanticSyntaxContext for SemanticSyntaxCheckerVisitor<'_> {
|
|||
fn in_loop_context(&self) -> bool {
|
||||
true
|
||||
}
|
||||
|
||||
fn is_bound_parameter(&self, _name: &str) -> bool {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
impl Visitor<'_> for SemanticSyntaxCheckerVisitor<'_> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue