mirror of https://github.com/astral-sh/ruff
Add backticks around setattr
This commit is contained in:
parent
e727c24f79
commit
4123ba9851
|
|
@ -502,7 +502,7 @@ For more, see [flake8-bugbear](https://pypi.org/project/flake8-bugbear/22.10.27/
|
||||||
| B007 | UnusedLoopControlVariable | Loop control variable `i` not used within the loop body. | 🛠 |
|
| B007 | UnusedLoopControlVariable | Loop control variable `i` not used within the loop body. | 🛠 |
|
||||||
| B008 | FunctionCallArgumentDefault | Do not perform function calls in argument defaults. | |
|
| B008 | FunctionCallArgumentDefault | Do not perform function calls in argument defaults. | |
|
||||||
| B009 | GetAttrWithConstant | Do not call `getattr` with a constant attribute value, it is not any safer than normal property access. | 🛠 |
|
| B009 | GetAttrWithConstant | Do not call `getattr` with a constant attribute value, it is not any safer than normal property access. | 🛠 |
|
||||||
| B010 | SetAttrWithConstant | Do not call setattr with a constant attribute value, it is not any safer than normal property access. | |
|
| B010 | SetAttrWithConstant | Do not call `setattr` with a constant attribute value, it is not any safer than normal property access. | |
|
||||||
| B011 | DoNotAssertFalse | Do not `assert False` (`python -O` removes these calls), raise `AssertionError()` | 🛠 |
|
| B011 | DoNotAssertFalse | Do not `assert False` (`python -O` removes these calls), raise `AssertionError()` | 🛠 |
|
||||||
| B013 | RedundantTupleInExceptionHandler | A length-one tuple literal is redundant. Write `except ValueError:` instead of `except (ValueError,):`. | |
|
| B013 | RedundantTupleInExceptionHandler | A length-one tuple literal is redundant. Write `except ValueError:` instead of `except (ValueError,):`. | |
|
||||||
| B014 | DuplicateHandlerException | Exception handler with duplicate exception: `ValueError` | 🛠 |
|
| B014 | DuplicateHandlerException | Exception handler with duplicate exception: `ValueError` | 🛠 |
|
||||||
|
|
|
||||||
|
|
@ -1292,7 +1292,7 @@ impl CheckKind {
|
||||||
value, it is not any safer than normal property \
|
value, it is not any safer than normal property \
|
||||||
access."
|
access."
|
||||||
.to_string(),
|
.to_string(),
|
||||||
CheckKind::SetAttrWithConstant => "Do not call setattr with a constant attribute \
|
CheckKind::SetAttrWithConstant => "Do not call `setattr` with a constant attribute \
|
||||||
value, it is not any safer than normal property \
|
value, it is not any safer than normal property \
|
||||||
access."
|
access."
|
||||||
.to_string(),
|
.to_string(),
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue