Skip to content

Commit 6c9b047

Browse files
committed
Apply ruff formatting to code
1 parent 543a86a commit 6c9b047

3 files changed

Lines changed: 3 additions & 6 deletions

File tree

β€Žultimatepython/advanced/meta_class.pyβ€Ž

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ class ModelMeta(type):
3939
model_fields: dict[str, "BaseField"]
4040
model_table: "ModelTable" | None
4141

42-
def __new__(
43-
mcs, name: str, bases: tuple[type, ...], attrs: dict[str, Any]
44-
) -> "ModelMeta":
42+
def __new__(mcs, name: str, bases: tuple[type, ...], attrs: dict[str, Any]) -> "ModelMeta":
4543
"""Factory for modifying the defined class at runtime.
4644
4745
Here are the following steps that we take:

β€Žultimatepython/advanced/pattern_matching.pyβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
Pattern matching was introduced in Python 3.10 through PEP 634, PEP 635,
77
and PEP 636. It uses the 'match' and 'case' keywords.
88
"""
9+
910
from typing import Any
1011

1112

β€Žultimatepython/syntax/arg_enforcement.pyβ€Ž

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,7 @@ def distance(x1: float, y1: float, x2: float, y2: float, /) -> float:
223223

224224
# Practical use case: Keyword-only is great for boolean flags or
225225
# optional parameters where the intent should be clear at call site
226-
def create_user(
227-
username: str, *, admin: bool = False, active: bool = True, send_email: bool = False
228-
) -> dict[str, object]:
226+
def create_user(username: str, *, admin: bool = False, active: bool = True, send_email: bool = False) -> dict[str, object]:
229227
"""Create a user with clear intent for optional parameters.
230228
231229
Making admin, active, and send_email keyword-only ensures that

0 commit comments

Comments
Β (0)