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 fc265a3 commit d2b25f3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
6 changes: 4 additions & 2 deletions src/poetry/core/constraints/generic/constraint.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,10 @@ def union(self, other: BaseConstraint) -> BaseConstraint:
if (
(ops in ({"!="}, {"not in"}))
or (
ops in ({"in", "!="}, {"in", "not in"})
and (self.operator == "in" and self.value in other.value)
(
ops in ({"in", "!="}, {"in", "not in"})
and (self.operator == "in" and self.value in other.value)
)
or (other.operator == "in" and other.value in self.value)
)
or self.invert() == other
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@ def is_adjacent_to(self, other: VersionRangeConstraint) -> bool:
if self.max != other.min:
return False

return (
self.include_max
and not other.include_min
or not self.include_max
and other.include_min
return (self.include_max and not other.include_min) or (
not self.include_max and other.include_min
)
2 changes: 1 addition & 1 deletion src/poetry/core/packages/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ def with_dependency_groups(
updated_groups = {
group_name: group
for group_name, group in self._dependency_groups.items()
if group_name in groups or not only and not group.is_optional()
if group_name in groups or (not only and not group.is_optional())
}
package = self.clone()
package._dependency_groups = updated_groups
Expand Down
2 changes: 1 addition & 1 deletion src/poetry/core/version/pep440/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
from poetry.core.version.pep440.version import PEP440Version


__all__ = ("LocalSegmentType", "Release", "ReleaseTag", "PEP440Version")
__all__ = ("LocalSegmentType", "PEP440Version", "Release", "ReleaseTag")

0 comments on commit d2b25f3

Please sign in to comment.