Skip to content

Commit

Permalink
fix: Fix some mypy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
zusorio committed Nov 29, 2024
1 parent 6489656 commit ed621ae
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 45 deletions.
60 changes: 30 additions & 30 deletions backend/capellacollab/settings/configuration/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,40 +69,40 @@ class CustomNavbarLink(NavbarLink):


class NavbarConfiguration(core_pydantic.BaseModelStrict):
external_links: list[BuiltInNavbarLink | CustomNavbarLink] = (
pydantic.Field(
default=(
external_links: (
list[BuiltInNavbarLink] | list[BuiltInNavbarLink | CustomNavbarLink]
) = pydantic.Field(
default=(
[
BuiltInNavbarLink(
name="Grafana",
service=BuiltInLinkItem.GRAFANA,
role=users_models.Role.ADMIN,
),
BuiltInNavbarLink(
name="Prometheus",
service=BuiltInLinkItem.PROMETHEUS,
role=users_models.Role.ADMIN,
),
BuiltInNavbarLink(
name="Documentation",
service=BuiltInLinkItem.DOCUMENTATION,
role=users_models.Role.USER,
),
]
+ (
[
BuiltInNavbarLink(
name="Grafana",
service=BuiltInLinkItem.GRAFANA,
role=users_models.Role.ADMIN,
),
BuiltInNavbarLink(
name="Prometheus",
service=BuiltInLinkItem.PROMETHEUS,
role=users_models.Role.ADMIN,
),
BuiltInNavbarLink(
name="Documentation",
service=BuiltInLinkItem.DOCUMENTATION,
name="SMTP Mock",
service=BuiltInLinkItem.SMTP_MOCK,
role=users_models.Role.USER,
),
)
]
+ (
[
BuiltInNavbarLink(
name="SMTP Mock",
service=BuiltInLinkItem.SMTP_MOCK,
role=users_models.Role.USER,
)
]
if core.DEVELOPMENT_MODE
else []
)
),
description="Links to display in the navigation bar.",
)
if core.DEVELOPMENT_MODE
else []
)
),
description="Links to display in the navigation bar.",
)


Expand Down
2 changes: 1 addition & 1 deletion backend/capellacollab/tools/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class ToolSessionEnvironment(core_pydantic.BaseModel):
),
)
value: str = pydantic.Field(
default={"RMT_PASSWORD": "{CAPELLACOLLAB_SESSION_TOKEN}"},
default='"RMT_PASSWORD": "{CAPELLACOLLAB_SESSION_TOKEN}"',
description=(
"Environment variables, which are mounted into session containers. "
"You can use f-strings to reference other environment variables in the value. "
Expand Down
3 changes: 2 additions & 1 deletion frontend/src/app/openapi/.openapi-generator/FILES

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

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

21 changes: 21 additions & 0 deletions frontend/src/app/openapi/model/external-links.ts

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

3 changes: 2 additions & 1 deletion frontend/src/app/openapi/model/models.ts

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

7 changes: 2 additions & 5 deletions frontend/src/app/openapi/model/navbar-configuration-input.ts

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

7 changes: 2 additions & 5 deletions frontend/src/app/openapi/model/navbar-configuration-output.ts

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

0 comments on commit ed621ae

Please sign in to comment.