summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimothy Edmund Crosley <timothy.crosley@gmail.com>2023-01-22 22:51:13 -0800
committerGitHub <noreply@github.com>2023-01-22 22:51:13 -0800
commit0c8a8b8d12a16bc54a7fe053eaf52fcbf5e15e35 (patch)
tree6992cfffef2c5178171b7d8b0352d363ab306695
parent5b63fba296cbce2b3cd944c28565c60ef8030a36 (diff)
parent779fe9ba35d427878055e423035df38700873cc6 (diff)
downloadisort-0c8a8b8d12a16bc54a7fe053eaf52fcbf5e15e35.tar.gz
Merge pull request #2076 from marksmayo/main
updated format strings to fstrings
-rw-r--r--.pymonbin0 -> 114688 bytes
-rw-r--r--isort/deprecated/finders.py2
-rw-r--r--isort/main.py2
-rw-r--r--isort/place.py2
-rw-r--r--isort/setuptools_commands.py2
5 files changed, 4 insertions, 4 deletions
diff --git a/.pymon b/.pymon
new file mode 100644
index 00000000..dd492ecd
--- /dev/null
+++ b/.pymon
Binary files differ
diff --git a/isort/deprecated/finders.py b/isort/deprecated/finders.py
index e80a59a0..d82947b2 100644
--- a/isort/deprecated/finders.py
+++ b/isort/deprecated/finders.py
@@ -63,7 +63,7 @@ class ForcedSeparateFinder(BaseFinder):
# Ensure all forced_separate patterns will match to end of string
path_glob = forced_separate
if not forced_separate.endswith("*"):
- path_glob = "%s*" % forced_separate
+ path_glob = f"{forced_separate}*"
if fnmatch(module_name, path_glob) or fnmatch(module_name, "." + path_glob):
return forced_separate
diff --git a/isort/main.py b/isort/main.py
index 26310048..bfb19fce 100644
--- a/isort/main.py
+++ b/isort/main.py
@@ -967,7 +967,7 @@ def _preconvert(item: Any) -> Union[str, List[Any]]:
return str(item)
if callable(item) and hasattr(item, "__name__"):
return str(item.__name__)
- raise TypeError("Unserializable object {} of type {}".format(item, type(item)))
+ raise TypeError(f"Unserializable object {item} of type {type(item)}")
def identify_imports_main(
diff --git a/isort/place.py b/isort/place.py
index 47a68c78..8a972f50 100644
--- a/isort/place.py
+++ b/isort/place.py
@@ -34,7 +34,7 @@ def _forced_separate(name: str, config: Config) -> Optional[Tuple[str, str]]:
# Ensure all forced_separate patterns will match to end of string
path_glob = forced_separate
if not forced_separate.endswith("*"):
- path_glob = "%s*" % forced_separate
+ path_glob = f"{forced_separate}*"
if fnmatch(name, path_glob) or fnmatch(name, "." + path_glob):
return (forced_separate, f"Matched forced_separate ({forced_separate}) config value.")
diff --git a/isort/setuptools_commands.py b/isort/setuptools_commands.py
index d60deda6..e0538ffe 100644
--- a/isort/setuptools_commands.py
+++ b/isort/setuptools_commands.py
@@ -43,7 +43,7 @@ class ISortCommand(setuptools.Command): # type: ignore
if self.distribution.py_modules:
for filename in self.distribution.py_modules:
- yield "%s.py" % filename
+ yield f"{filename}.py"
# Don't miss the setup.py file itself
yield "setup.py"