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 79b8796 commit 76f3a6a
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 81 deletions.
61 changes: 31 additions & 30 deletions backend/capellacollab/settings/configuration/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import enum
import typing as t
import zoneinfo
from collections import abc as collections_abc

import pydantic
from croniter import croniter
Expand Down Expand Up @@ -69,40 +70,40 @@ class CustomNavbarLink(NavbarLink):


class NavbarConfiguration(core_pydantic.BaseModelStrict):
external_links: list[BuiltInNavbarLink | CustomNavbarLink] = (
pydantic.Field(
default=(
external_links: collections_abc.Sequence[
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

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.

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.

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.

0 comments on commit 76f3a6a

Please sign in to comment.