diff --git a/isort/finders.py b/isort/finders.py index 210ddfd5e..9fc98b5fb 100644 --- a/isort/finders.py +++ b/isort/finders.py @@ -186,6 +186,8 @@ def find(self, module_name: str) -> Optional[str]: return sections.STDLIB elif self.conda_env and self.conda_env in prefix: return sections.THIRDPARTY + if os.getcwd() in package_path: + return sections.FIRSTPARTY elif os.path.normcase(prefix).startswith(self.stdlib_lib_prefix): return sections.STDLIB # pragma: no cover - edge case for one OS. Hard to test. return self.config.default_section