Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 25, 2024
1 parent a7cd75b commit 7faf04a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion unidep/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from unidep._version import __version__

__all__ = [
"__version__",
"create_conda_env_specification",
"filter_python_dependencies",
"find_requirements_files",
Expand All @@ -25,5 +26,4 @@
"parse_requirements",
"resolve_conflicts",
"write_conda_environment_file",
"__version__",
]
12 changes: 4 additions & 8 deletions unidep/_conflicts.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,19 +229,15 @@ def _is_redundant(pinning: str, other_pinnings: list[str]) -> bool:
continue

if op == "<" and (
other_op == "<"
and version >= other_version
or other_op == "<="
and version > other_version
(other_op == "<" and version >= other_version)
or (other_op == "<=" and version > other_version)
):
return True
if op == "<=" and other_op in ["<", "<="] and version >= other_version:
return True
if op == ">" and (
other_op == ">"
and version <= other_version
or other_op == ">="
and version < other_version
(other_op == ">" and version <= other_version)
or (other_op == ">=" and version < other_version)
):
return True
if op == ">=" and other_op in [">", ">="] and version <= other_version:
Expand Down

0 comments on commit 7faf04a

Please sign in to comment.