Skip to content

Commit 0c8a8b8

Browse files
authoredJan 23, 2023
Merge pull request #2076 from marksmayo/main
updated format strings to fstrings
2 parents 5b63fba + 779fe9b commit 0c8a8b8

File tree

5 files changed

+4
-4
lines changed

5 files changed

+4
-4
lines changed
 

‎.pymon

112 KB
Binary file not shown.

‎isort/deprecated/finders.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def find(self, module_name: str) -> Optional[str]:
6363
# Ensure all forced_separate patterns will match to end of string
6464
path_glob = forced_separate
6565
if not forced_separate.endswith("*"):
66-
path_glob = "%s*" % forced_separate
66+
path_glob = f"{forced_separate}*"
6767

6868
if fnmatch(module_name, path_glob) or fnmatch(module_name, "." + path_glob):
6969
return forced_separate

‎isort/main.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -967,7 +967,7 @@ def _preconvert(item: Any) -> Union[str, List[Any]]:
967967
return str(item)
968968
if callable(item) and hasattr(item, "__name__"):
969969
return str(item.__name__)
970-
raise TypeError("Unserializable object {} of type {}".format(item, type(item)))
970+
raise TypeError(f"Unserializable object {item} of type {type(item)}")
971971

972972

973973
def identify_imports_main(

‎isort/place.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def _forced_separate(name: str, config: Config) -> Optional[Tuple[str, str]]:
3434
# Ensure all forced_separate patterns will match to end of string
3535
path_glob = forced_separate
3636
if not forced_separate.endswith("*"):
37-
path_glob = "%s*" % forced_separate
37+
path_glob = f"{forced_separate}*"
3838

3939
if fnmatch(name, path_glob) or fnmatch(name, "." + path_glob):
4040
return (forced_separate, f"Matched forced_separate ({forced_separate}) config value.")

‎isort/setuptools_commands.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def distribution_files(self) -> Iterator[str]:
4343

4444
if self.distribution.py_modules:
4545
for filename in self.distribution.py_modules:
46-
yield "%s.py" % filename
46+
yield f"{filename}.py"
4747
# Don't miss the setup.py file itself
4848
yield "setup.py"
4949

0 commit comments

Comments
 (0)
Please sign in to comment.