Skip to content

Commit 46076b8

Browse files
committed
Reformatted
1 parent 849d5dd commit 46076b8

File tree

25 files changed

+373
-256
lines changed

25 files changed

+373
-256
lines changed

src/ci/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727

2828
import os
2929

30-
version = os.environ.get('MRMAT_VERSION', '0.0.0.dev0')
30+
version = os.environ.get("MRMAT_VERSION", "0.0.0.dev0")

src/mrmat_python_api_fastapi/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@
2323
from pydantic import BaseModel
2424

2525
from .config import Config
26+
2627
app_config = Config.from_context()
2728
from sqlalchemy.orm import DeclarativeBase
2829

30+
2931
class ORMBase(DeclarativeBase):
3032
pass
3133

3234

3335
class SchemaBase(BaseModel):
34-
model_config = {'from_attributes': True}
36+
model_config = {"from_attributes": True}

src/mrmat_python_api_fastapi/apis/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,6 @@ class StatusSchema(BaseModel):
2727
"""
2828
A generic message class
2929
"""
30+
3031
code: int
3132
msg: str

src/mrmat_python_api_fastapi/apis/greeting/v1/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
# SOFTWARE.
2222

23-
from .model import GreetingV1Output # noqa: F401
23+
from .model import GreetingV1Output # noqa: F401
2424
from .api import router as api_greeting_v1 # noqa: F401

src/mrmat_python_api_fastapi/apis/greeting/v1/api.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@
2626
router = APIRouter()
2727

2828

29-
@router.get('/',
30-
response_model=GreetingV1Output,
31-
name='get_greeting',
32-
description='Get a generic greeting since this version of the greeting API does not have a means to '
33-
'determine who you are',
34-
response_description='A JSON-encoded Hello World message')
29+
@router.get(
30+
"/",
31+
response_model=GreetingV1Output,
32+
name="get_greeting",
33+
description="Get a generic greeting since this version of the greeting API does not have a means to "
34+
"determine who you are",
35+
response_description="A JSON-encoded Hello World message",
36+
)
3537
async def get_greeting():
3638
"""
3739
Return a Hello World message

src/mrmat_python_api_fastapi/apis/greeting/v1/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424

2525

2626
class GreetingV1Output(BaseModel):
27-
message: str = Field(default='Hello World', title='A generic greeting message')
27+
message: str = Field(default="Hello World", title="A generic greeting message")

src/mrmat_python_api_fastapi/apis/greeting/v2/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
# SOFTWARE.
2222

23-
from .model import GreetingV2Output # noqa: F401
24-
from .api import router as api_greeting_v2 # noqa: F401
23+
from .model import GreetingV2Output # noqa: F401
24+
from .api import router as api_greeting_v2 # noqa: F401

src/mrmat_python_api_fastapi/apis/greeting/v2/api.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,12 @@
3232
router = APIRouter()
3333

3434

35-
@router.get('/',
36-
response_model=GreetingV2Output,
37-
name='get_greeting_v2',
38-
description='Get a greeting for a given name',
39-
response_description='A JSON-encoded greeting for the provided name')
40-
async def get_greeting(name: Optional[str] = 'Stranger'):
41-
return GreetingV2Output(message=f'Hello {name}')
35+
@router.get(
36+
"/",
37+
response_model=GreetingV2Output,
38+
name="get_greeting_v2",
39+
description="Get a greeting for a given name",
40+
response_description="A JSON-encoded greeting for the provided name",
41+
)
42+
async def get_greeting(name: Optional[str] = "Stranger"):
43+
return GreetingV2Output(message=f"Hello {name}")

src/mrmat_python_api_fastapi/apis/greeting/v2/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@
2424

2525

2626
class GreetingV2Output(BaseModel):
27-
message: str = Field(description='A greeting message')
27+
message: str = Field(description="A greeting message")

src/mrmat_python_api_fastapi/apis/greeting/v3/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
2121
# SOFTWARE.
2222

23-
from .model import GreetingV3Output # noqa: F401
23+
from .model import GreetingV3Output # noqa: F401
2424
from .api import router as api_greeting_v3 # noqa: F401

0 commit comments

Comments
 (0)