Skip to content

Commit

Permalink
Merge pull request #2076 from marksmayo/main
Browse files Browse the repository at this point in the history
updated format strings to fstrings
  • Loading branch information
timothycrosley committed Jan 23, 2023
2 parents 5b63fba + 779fe9b commit 0c8a8b8
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 4 deletions.
Binary file added .pymon
Binary file not shown.
2 changes: 1 addition & 1 deletion isort/deprecated/finders.py
Expand Up @@ -63,7 +63,7 @@ def find(self, module_name: str) -> Optional[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(module_name, path_glob) or fnmatch(module_name, "." + path_glob):
return forced_separate
Expand Down
2 changes: 1 addition & 1 deletion isort/main.py
Expand Up @@ -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(
Expand Down
2 changes: 1 addition & 1 deletion isort/place.py
Expand Up @@ -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.")
Expand Down
2 changes: 1 addition & 1 deletion isort/setuptools_commands.py
Expand Up @@ -43,7 +43,7 @@ def distribution_files(self) -> Iterator[str]:

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"

Expand Down

0 comments on commit 0c8a8b8

Please sign in to comment.