summaryrefslogtreecommitdiff
path: root/pylint/pyreverse/inspector.py
diff options
context:
space:
mode:
authorPierre Sassoulas <pierre.sassoulas@gmail.com>2021-02-21 13:27:11 +0100
committerPierre Sassoulas <pierre.sassoulas@gmail.com>2021-02-21 15:36:16 +0100
commit5bed07eba999130b6551acc7c43192d6a8eada43 (patch)
tree09e3a11503bd074363556e8a5fd33fc0e8db7fc4 /pylint/pyreverse/inspector.py
parenta1e553d3bb07c56ca99c31279f9af104bede0a32 (diff)
downloadpylint-git-5bed07eba999130b6551acc7c43192d6a8eada43.tar.gz
Move from % string formatting syntax to f-string or .format()
Diffstat (limited to 'pylint/pyreverse/inspector.py')
-rw-r--r--pylint/pyreverse/inspector.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pylint/pyreverse/inspector.py b/pylint/pyreverse/inspector.py
index bba6d26c0..17ef46bff 100644
--- a/pylint/pyreverse/inspector.py
+++ b/pylint/pyreverse/inspector.py
@@ -261,7 +261,7 @@ class Linker(IdGeneratorMixIn, utils.LocalsVisitor):
if name[0] == "*":
continue
# analyze dependencies
- fullname = "%s.%s" % (basename, name[0])
+ fullname = "{}.{}".format(basename, name[0])
if fullname.find(".") > -1:
try:
fullname = modutils.get_module_part(fullname, context_file)
@@ -284,7 +284,7 @@ class Linker(IdGeneratorMixIn, utils.LocalsVisitor):
module = node.root()
context_name = module.name
if relative:
- mod_path = "%s.%s" % (".".join(context_name.split(".")[:-1]), mod_path)
+ mod_path = "{}.{}".format(".".join(context_name.split(".")[:-1]), mod_path)
if self.compute_module(context_name, mod_path):
# handle dependencies
if not hasattr(module, "depends"):
@@ -319,7 +319,7 @@ class Project:
return self.modules
def __repr__(self):
- return "<Project %r at %s (%s modules)>" % (
+ return "<Project {!r} at {} ({} modules)>".format(
self.name,
id(self),
len(self.modules),