mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-10-01 03:43:46 +08:00
Convert format strings strings to f-strings (#23241)
* Convert all text strings to f-strings Reformats all the text from the old "%-formatted" and .format(...) format to the newer f-string format, as defined in PEP 498. This requires Python 3.6+. Flynt 0.69 was used to reformat the strings. 120 f-strings were created in 51 files. F-strings are in general more readable, concise and performant. See also: https://www.python.org/dev/peps/pep-0498/#rationale * revert pyextra changes * revert ublox.py Co-authored-by: Willem Melching <willem.melching@gmail.com> old-commit-hash: 55390d273f36f49da3896e687ac5530f40c1d150
This commit is contained in:
+1
-1
@@ -12,7 +12,7 @@ class Timeout:
|
||||
"""
|
||||
def __init__(self, seconds, error_msg=None):
|
||||
if error_msg is None:
|
||||
error_msg = 'Timed out after {} seconds'.format(seconds)
|
||||
error_msg = f'Timed out after {seconds} seconds'
|
||||
self.seconds = seconds
|
||||
self.error_msg = error_msg
|
||||
|
||||
|
||||
Reference in New Issue
Block a user