Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #794

Merged
merged 2 commits into from
Nov 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")
Loading