Skip to content

Commit 66f2922

Browse files
committed
Fix for W1309: Using an f-string that does not have any interpolated variables (f-string-without-interpolation)
1 parent cd99923 commit 66f2922

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

0009-If-Else-Elif/if_else_elif.py

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,25 @@
66

77
AGE = 40
88

9-
print(f"If-example")
9+
print("If-example")
1010
AGE = 18
1111
if AGE >= 18:
1212
print("You are eligible to vote.")
1313

14-
print(f"======================================================")
15-
14+
print("======================================================")
15+
print()
1616

17-
print(f"If-else-example")
18-
print(f"Hospital admission when the age is {AGE}")
17+
print("If-else-example")
18+
print("Hospital admission when the age is {AGE}")
1919

2020
if AGE <= 18:
2121
print("You should be admitted to the Pediatric Department.")
2222
else:
2323
print("You should be admitted to the Adult Department.")
2424
print(f"======================================================")
25+
print()
2526

26-
print(f"If-else-with-multiple-lines-example")
27+
print("If-else-with-multiple-lines-example")
2728
print(f"Hospital admission when the age is {AGE}")
2829

2930
if AGE <= 18:
@@ -32,10 +33,10 @@
3233
else:
3334
print(f"Your age is {AGE}.")
3435
print("You should be admitted to the Adult Department.")
35-
print(f"======================================================")
36+
print("======================================================")
37+
print()
3638

3739
print("if-elif-else example")
38-
3940
print("elif = else if")
4041

4142
MARKS = 85
@@ -48,7 +49,7 @@
4849
else:
4950
print("Grade: D")
5051
print(f"======================================================")
51-
52+
print()
5253

5354
print("Nested if Statements example")
5455

@@ -62,7 +63,7 @@
6263
print("Negative number")
6364

6465
print(f"======================================================")
65-
66+
print()
6667

6768
print("Using Logical Operators example")
6869

@@ -71,9 +72,9 @@
7172
has_id = True
7273

7374
if AGE >= 18 and has_id:
74-
print(f"You can enter the club, as your age is {AGE}.")
75+
print("You can enter the club, as your age is {AGE}.")
7576
else:
76-
print(f"Entry denied, as your age is {AGE}.")
77+
print("Entry denied, as your age is {AGE}.")
7778

7879

79-
print(f"======================================================")
80+
print("======================================================")

0 commit comments

Comments
 (0)