Skip to content

Commit

Permalink
Merge pull request #2089 from PyCQA/removal/unused-extras
Browse files Browse the repository at this point in the history
Cleanup deprecated extras
  • Loading branch information
staticdev authored Feb 21, 2023
2 parents 4114c33 + 869dc58 commit 7024ceb
Show file tree
Hide file tree
Showing 5 changed files with 876 additions and 1,009 deletions.
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,24 +82,6 @@ Installing isort is as simple as:
pip install isort
```

Install isort with requirements.txt support:

```bash
pip install isort[requirements_deprecated_finder]
```

Install isort with Pipfile support:

```bash
pip install isort[pipfile_deprecated_finder]
```

Install isort with both formats support:

```bash
pip install isort[requirements_deprecated_finder,pipfile_deprecated_finder]
```

## Using isort

**From the command line**:
Expand Down
23 changes: 1 addition & 22 deletions isort/deprecated/finders.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,7 @@
from pip_api import parse_requirements # type: ignore

except ImportError:
parse_requirements = None # type: ignore

try:
from requirementslib import Pipfile # type: ignore

except ImportError:
Pipfile = None
parse_requirements = None


@contextmanager
Expand Down Expand Up @@ -346,20 +340,6 @@ def _get_names_cached(cls, path: str) -> List[str]:
return result


class PipfileFinder(ReqsBaseFinder):
enabled = bool(Pipfile)

def _get_names(self, path: str) -> Iterator[str]:
with chdir(path):
project = Pipfile.load(path)
for req in project.packages:
yield req.name

def _get_files_from_dir(self, path: str) -> Iterator[str]:
if "Pipfile" in os.listdir(path):
yield path


class DefaultFinder(BaseFinder):
def find(self, module_name: str) -> Optional[str]:
return self.config.default_section
Expand All @@ -371,7 +351,6 @@ class FindersManager:
LocalFinder,
KnownPatternFinder,
PathFinder,
PipfileFinder,
RequirementsFinder,
DefaultFinder,
)
Expand Down
Loading

0 comments on commit 7024ceb

Please sign in to comment.