diff --git a/.pymon b/.pymon new file mode 100644 index 00000000..dd492ecd Binary files /dev/null and b/.pymon 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 @@ 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 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 @@ 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"