Skip to content
This repository was archived by the owner on Oct 24, 2025. It is now read-only.

Commit 994bff8

Browse files
committed
Converted usage of .format(...) to f-strings.
1 parent ebdaded commit 994bff8

3 files changed

Lines changed: 4 additions & 8 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ from pathlib import Path
6262
from pyTooling.TerminalUI import LineTerminal, ILineTerminal
6363

6464
class SubModule(ILineTerminal):
65-
def __init__(self, configFile, terminal):
65+
def __init__(self, configFile: Path, terminal):
6666
super().__init__(terminal)
6767

6868
if not configFile.exists():
69-
self.WriteError("Config file '{0!s}' not found.".format(configFile))
69+
self.WriteError(f"Config file '{configFile}' not found.")
7070

7171

7272
class Application(LineTerminal):

doc/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def _LatestTagName():
8787
with open(prologPath, "r") as prologFile:
8888
rst_prolog = prologFile.read()
8989
except Exception as ex:
90-
print("[ERROR:] While reading '{0!s}'.".format(prologPath))
90+
print(f"[ERROR:] While reading '{prologPath}'.")
9191
print(ex)
9292
rst_prolog = ""
9393

pyTooling/TerminalUI/__init__.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,11 +153,7 @@ def versionCheck(cls, version):
153153
level=version_info.releaselevel,
154154
**cls.Foreground
155155
))
156-
print(" Minimal required Python version is {major}.{minor}.{micro}".format(
157-
major=version[0],
158-
minor=version[1],
159-
micro=version[2]
160-
))
156+
print(f" Minimal required Python version is {version[0]}.{version[1]}.{version[2]}")
161157

162158
cls.exit(1)
163159

0 commit comments

Comments
 (0)