Skip to content

Commit a963f15

Browse files
committed
Python: format strings are unnecessary and mess up
For some reason, we got no results when format strings were present.
1 parent 959c631 commit a963f15

File tree

3 files changed

+133
-102
lines changed

3 files changed

+133
-102
lines changed

python/ql/test/experimental/dataflow/coverage/classes.py

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ def __radd__(self, other):
769769

770770
def test_radd():
771771
with_radd = With_radd()
772-
f"" + with_radd
772+
"" + with_radd
773773

774774
# object.__rsub__(self, other)
775775
class With_rsub:
@@ -780,7 +780,7 @@ def __rsub__(self, other):
780780

781781
def test_rsub():
782782
with_rsub = With_rsub()
783-
f"" - with_rsub
783+
"" - with_rsub
784784

785785
# object.__rmul__(self, other)
786786
class With_rmul:
@@ -791,7 +791,7 @@ def __rmul__(self, other):
791791

792792
def test_rmul():
793793
with_rmul = With_rmul()
794-
f"" * with_rmul
794+
"" * with_rmul
795795

796796
# object.__rmatmul__(self, other)
797797
class With_rmatmul:
@@ -802,7 +802,7 @@ def __rmatmul__(self, other):
802802

803803
def test_rmatmul():
804804
with_rmatmul = With_rmatmul()
805-
f"" @ with_rmatmul
805+
"" @ with_rmatmul
806806

807807
# object.__rtruediv__(self, other)
808808
class With_rtruediv:
@@ -813,7 +813,7 @@ def __rtruediv__(self, other):
813813

814814
def test_rtruediv():
815815
with_rtruediv = With_rtruediv()
816-
f"" / with_rtruediv
816+
"" / with_rtruediv
817817

818818
# object.__rfloordiv__(self, other)
819819
class With_rfloordiv:
@@ -824,7 +824,7 @@ def __rfloordiv__(self, other):
824824

825825
def test_rfloordiv():
826826
with_rfloordiv = With_rfloordiv()
827-
f"" // with_rfloordiv
827+
"" // with_rfloordiv
828828

829829
# object.__rmod__(self, other)
830830
class With_rmod:
@@ -846,7 +846,7 @@ def __rdivmod__(self, other):
846846

847847
def test_rdivmod():
848848
with_rdivmod = With_rdivmod()
849-
divmod(f"", with_rdivmod)
849+
divmod("", with_rdivmod)
850850

851851
# object.__rpow__(self, other[, modulo])
852852
class With_rpow:
@@ -857,11 +857,11 @@ def __rpow__(self, other):
857857

858858
def test_rpow():
859859
with_rpow = With_rpow()
860-
pow(f"", with_rpow)
860+
pow("", with_rpow)
861861

862862
def test_rpow_op():
863863
with_rpow = With_rpow()
864-
f"" ** with_rpow
864+
"" ** with_rpow
865865

866866
# object.__rlshift__(self, other)
867867
class With_rlshift:
@@ -872,7 +872,7 @@ def __rlshift__(self, other):
872872

873873
def ftest_rlshift(): # TypeError: unsupported operand type(s) for >>: 'str' and 'With_rlshift'
874874
with_rlshift = With_rlshift()
875-
f"" >> with_rlshift
875+
"" >> with_rlshift
876876

877877
# object.__rrshift__(self, other)
878878
class With_rrshift:
@@ -883,7 +883,7 @@ def __rrshift__(self, other):
883883

884884
def ftest_rrshift(): # TypeError: unsupported operand type(s) for <<: 'str' and 'With_rrshift'
885885
with_rrshift = With_rrshift()
886-
f"" << with_rrshift
886+
"" << with_rrshift
887887

888888
# object.__rand__(self, other)
889889
class With_rand:
@@ -894,7 +894,7 @@ def __rand__(self, other):
894894

895895
def test_rand():
896896
with_rand = With_rand()
897-
f"" & with_rand
897+
"" & with_rand
898898

899899
# object.__rxor__(self, other)
900900
class With_rxor:
@@ -905,7 +905,7 @@ def __rxor__(self, other):
905905

906906
def test_rxor():
907907
with_rxor = With_rxor()
908-
f"" ^ with_rxor
908+
"" ^ with_rxor
909909

910910
# object.__ror__(self, other)
911911
class With_ror:
@@ -916,7 +916,7 @@ def __ror__(self, other):
916916

917917
def test_ror():
918918
with_ror = With_ror()
919-
f"" | with_ror
919+
"" | with_ror
920920

921921
# object.__iadd__(self, other)
922922
class With_iadd:

0 commit comments

Comments
 (0)