mirror of
https://github.com/esphome/esphome.git
synced 2025-09-03 03:42:20 +01:00
[ruff] Enable FURB rules for code modernization (#9896)
This commit is contained in:
@@ -771,8 +771,7 @@ class MockObj(Expression):
|
||||
if attr.startswith("P") and self.op not in ["::", ""]:
|
||||
attr = attr[1:]
|
||||
next_op = "->"
|
||||
if attr.startswith("_"):
|
||||
attr = attr[1:]
|
||||
attr = attr.removeprefix("_")
|
||||
return MockObj(f"{self.base}{self.op}{attr}", next_op)
|
||||
|
||||
def __call__(self, *args: SafeExpType) -> "MockObj":
|
||||
|
Reference in New Issue
Block a user