Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (python-poetry#794)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Nov 26, 2024
1 parent 29db619 commit b95ec53
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ repos:
- id: check-docstring-first

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.7.4
rev: v0.8.0
hooks:
- id: ruff
- id: ruff-format
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 b95ec53

Please sign in to comment.