Skip to content

Commit

Permalink
Bump black from 23.12.1 to 24.1.0 (#108)
Browse files Browse the repository at this point in the history
Bumps [black](https://github.com/psf/black) from 23.12.1 to 24.1.0.
- [Release notes](https://github.com/psf/black/releases)
- [Changelog](https://github.com/psf/black/blob/main/CHANGES.md)
- [Commits](psf/black@23.12.1...24.1.0)

---
updated-dependencies:
- dependency-name: black
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
dependabot[bot] authored Jan 26, 2024
1 parent aa4ace9 commit 11cf313
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 33 deletions.
16 changes: 10 additions & 6 deletions api/endpoints/calendar.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ async def get_webinars(
duration=int((webinar.end - webinar.start).total_seconds()) // 60,
price=webinar.price,
admin_link=webinar.admin_link if admin or user_id == webinar.creator else None,
link=webinar.link
if admin or user_id == webinar.creator or (_booked and webinar.start - utcnow() < timedelta(days=1))
else None,
link=(
webinar.link
if admin or user_id == webinar.creator or (_booked and webinar.start - utcnow() < timedelta(days=1))
else None
),
instructor=await get_userinfo(webinar.creator),
instructor_rating=await models.LecturerRating.get_rating(webinar.creator, webinar.skill_id),
booked=_booked,
Expand Down Expand Up @@ -143,9 +145,11 @@ async def get_coachings(
instructor_rating=await models.LecturerRating.get_rating(slot.user_id, slot.skill_id),
booked=True,
bookable=False,
student=await get_userinfo(slot.booked_by)
if admin or user_id in (slot.user_id, slot.booked_by)
else None,
student=(
await get_userinfo(slot.booked_by)
if admin or user_id in (slot.user_id, slot.booked_by)
else None
),
)
)
continue
Expand Down
48 changes: 24 additions & 24 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ redis = "^5.0.1"
[tool.poetry.group.dev.dependencies]
flake8 = "^7.0.0"
isort = "^5.13.2"
black = "^23.12.1"
black = "^24.1.0"
wemake-python-styleguide = "^0.18.0"
mypy = "^1.8"
SQLAlchemy = { extras = ["mypy"], version = "^1.4.42" }
Expand Down
4 changes: 2 additions & 2 deletions tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ def get_decorated_function(
) -> tuple[Any, Callable[..., Any]]:
functions: list[Callable[..., Any]] = []
decorator = MagicMock(side_effect=functions.append)
getattr(fastapi_patch(), decorator_name).side_effect = (
lambda *args, **kwargs: decorator if (args, kwargs) == (decorator_args, decorator_kwargs) else MagicMock()
getattr(fastapi_patch(), decorator_name).side_effect = lambda *args, **kwargs: (
decorator if (args, kwargs) == (decorator_args, decorator_kwargs) else MagicMock()
)
fastapi_patch.reset_mock()

Expand Down

0 comments on commit 11cf313

Please sign in to comment.