mirror of https://github.com/zulip/zulip.git
lint: Prohibit percent formatting on literal format strings.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
5dc9b55c43
commit
769e198ab0
|
@ -116,3 +116,11 @@ rules:
|
|||
...
|
||||
severity: ERROR
|
||||
message: "Guard mutable default with read-only type (Sequence, Mapping, AbstractSet)"
|
||||
|
||||
- id: percent-formatting
|
||||
languages: [python]
|
||||
pattern-either:
|
||||
- pattern: '"..." % ...'
|
||||
- pattern: '("...") % ...'
|
||||
severity: ERROR
|
||||
message: "Prefer f-strings or .format for string formatting"
|
||||
|
|
Loading…
Reference in New Issue