-
Notifications
You must be signed in to change notification settings - Fork 17
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
mydiracx extension extensions/src/mydiracx #124
Conversation
Thanks, we will keep this open, and start from this one after the workshop |
00aa3b6
to
3f800d2
Compare
c8c5dac
to
12b2d87
Compare
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
7081d3a
to
12c6f02
Compare
e3ce12e
to
f5f4cf2
Compare
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@@ -0,0 +1,5 @@ | |||
from __future__ import annotations | |||
|
|||
__all__ = "DummyDB" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a list
@@ -0,0 +1,56 @@ | |||
from __future__ import annotations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is not needed
@@ -0,0 +1,5 @@ | |||
from __future__ import annotations | |||
|
|||
__all__ = "sql" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This need sto be a list
@@ -0,0 +1,294 @@ | |||
from __future__ import annotations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is not needed
from typing import Annotated, TypeVar | ||
|
||
from fastapi import Depends | ||
|
||
from mydiracx.db.sql import DummyDB as _DummyDB | ||
|
||
T = TypeVar("T") | ||
|
||
|
||
def add_settings_annotation(cls: T) -> T: | ||
"""Add a `Depends` annotation to a class that has a `create` classmethod.""" | ||
return Annotated[cls, Depends(cls.create)] # type: ignore | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All this is useless
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
@ruslan33 as agreed I'll start from your PR and push it a bit further. Thanks a lot for it ! |
I'll close this one and continue your work in #249 |
First prototype of diracx extension