Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5319e89

Browse files
Apply new string format syntax to exception string
Co-authored-by: Elliott Sales de Andrade <[email protected]>
1 parent af69105 commit 5319e89

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

examples/widgets/annotated_cursor.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -237,9 +237,8 @@ def setpos(self, xpos, ypos):
237237
data = ydata
238238
lim = self.ax.get_ylim()
239239
else:
240-
raise ValueError(
241-
"The data axis specifier {} should be 'x' or 'y'"
242-
.format(self.dataaxis))
240+
raise ValueError(f"The data axis specifier {self.dataaxis} should "
241+
f"be 'x' or 'y'")
243242

244243
# If position is valid
245244
if pos is not None:

0 commit comments

Comments
 (0)