We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1b55f4 commit 8022814Copy full SHA for 8022814
tests/functional/r/regression_02/regression_8109.py
@@ -0,0 +1,15 @@
1
+"""Regression test for https://github.com/PyCQA/pylint/issues/8109."""
2
+
3
+# pylint: disable=missing-docstring, unsupported-binary-operation
4
5
+from dataclasses import dataclass
6
7
8
+@dataclass
9
+class Number:
10
+ amount: int | float
11
+ round: int = 2
12
13
+ def __str__(self):
14
+ number_format = "{:,.%sf}" % self.round # [consider-using-f-string]
15
+ return number_format.format(self.amount).rstrip("0").rstrip(".")
tests/functional/r/regression_02/regression_8109.txt
@@ -0,0 +1 @@
+consider-using-f-string:14:24:14:34:Number.__str__:Formatting a regular string which could be a f-string:UNDEFINED
0 commit comments