Browse Source

typing.Self は Python 3.10 には未実装か,さぅか.

main
みてるぞ 4 weeks ago
parent
commit
da17333a80
1 changed files with 1 additions and 3 deletions
  1. +1
    -3
      my_eloquent.py

+ 1
- 3
my_eloquent.py View File

@@ -1,5 +1,3 @@
from typing import Self

import eloquent import eloquent




@@ -25,7 +23,7 @@ class Model (eloquent.Model):
def with_ ( def with_ (
cls, cls,
*relations: str, *relations: str,
) -> eloquent.QueryBuilder[Self]:
) -> eloquent.QueryBuilder:
q = cls.query () q = cls.query ()
for relation in relations: for relation in relations:
q = q._load_relation (relation) q = q._load_relation (relation)


Loading…
Cancel
Save