Skip to content

Commit d2b25f3

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent fc265a3 commit d2b25f3

File tree

4 files changed

+8
-9
lines changed

4 files changed

+8
-9
lines changed

src/poetry/core/constraints/generic/constraint.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,10 @@ def union(self, other: BaseConstraint) -> BaseConstraint:
182182
if (
183183
(ops in ({"!="}, {"not in"}))
184184
or (
185-
ops in ({"in", "!="}, {"in", "not in"})
186-
and (self.operator == "in" and self.value in other.value)
185+
(
186+
ops in ({"in", "!="}, {"in", "not in"})
187+
and (self.operator == "in" and self.value in other.value)
188+
)
187189
or (other.operator == "in" and other.value in self.value)
188190
)
189191
or self.invert() == other

src/poetry/core/constraints/version/version_range_constraint.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,6 @@ def is_adjacent_to(self, other: VersionRangeConstraint) -> bool:
117117
if self.max != other.min:
118118
return False
119119

120-
return (
121-
self.include_max
122-
and not other.include_min
123-
or not self.include_max
124-
and other.include_min
120+
return (self.include_max and not other.include_min) or (
121+
not self.include_max and other.include_min
125122
)

src/poetry/core/packages/package.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ def with_dependency_groups(
461461
updated_groups = {
462462
group_name: group
463463
for group_name, group in self._dependency_groups.items()
464-
if group_name in groups or not only and not group.is_optional()
464+
if group_name in groups or (not only and not group.is_optional())
465465
}
466466
package = self.clone()
467467
package._dependency_groups = updated_groups

src/poetry/core/version/pep440/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
from poetry.core.version.pep440.version import PEP440Version
77

88

9-
__all__ = ("LocalSegmentType", "Release", "ReleaseTag", "PEP440Version")
9+
__all__ = ("LocalSegmentType", "PEP440Version", "Release", "ReleaseTag")

0 commit comments

Comments
 (0)