Skip to content

Commit

Permalink
Merge pull request #329 from Roche/ba69dependabot/pip/mypy-1.3.0
Browse files Browse the repository at this point in the history
Bump mypy from 1.0.1 to 1.3.0
  • Loading branch information
defreng authored May 28, 2023
2 parents 37bfc19 + 7d70f25 commit 9d0dedc
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 76 deletions.
136 changes: 68 additions & 68 deletions poetry.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pytest-randomly = "^3.12.0"

# Typing
# mypy >= 1.1.0 has issues with pydantic: https://github.com/pydantic/pydantic/pull/5077
mypy = ">=1.0.0,<1.1.0"
mypy = ">=1.0.0,<1.4.0"
SQLAlchemy = {extras = ["mypy"], version = "^2.0.2"}

# Docs
Expand Down
4 changes: 2 additions & 2 deletions src/foxops/cli/v1_compat_reconcile/reconcile.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from pathlib import Path

import typer
from pydantic import SecretStr
from ruamel.yaml import YAML

from foxops.cli.v1_compat_reconcile.api import foxops_api
Expand Down Expand Up @@ -45,7 +46,7 @@ def cmd_reconcile(
raise typer.Exit(1)

logger.debug("configuring settings for reconciliation")
settings = Settings()
settings = Settings(static_token=SecretStr("dummysecret"))
logger.debug("configured settings", settings=settings)

logger.debug(
Expand Down Expand Up @@ -130,7 +131,6 @@ def expand_dir(path: Path) -> list[Path]:
)
incarnation_id = incarnation_before_update.id
dis_patch = DesiredIncarnationStatePatch(
template_repository=config.template_repository,
template_repository_version=config.template_repository_version,
template_data=config.template_data,
automerge=config.automerge,
Expand Down
10 changes: 5 additions & 5 deletions src/foxops/engine/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import copy
from dataclasses import asdict, dataclass
from pathlib import Path
from typing import Mapping
from typing import Annotated, Mapping

from pydantic import BaseModel, Field
from ruamel.yaml import YAML
Expand Down Expand Up @@ -65,10 +65,10 @@ def load_incarnation_state_from_string(incarnation_state: str) -> IncarnationSta
class VariableDefinition(BaseModel):
type: str = Field(..., description="The type of the variable")
description: str = Field(..., help="The description for this variable")
default: TemplateDataValue | None = Field(
None,
help="The default value for this variable (setting this makes the variable optional)",
)
default: Annotated[
TemplateDataValue | None,
Field(help="The default value for this variable (setting this makes the variable optional)"),
] = None

def is_required(self) -> bool:
return self.default is None
Expand Down
1 change: 1 addition & 0 deletions src/foxops/services/change.py
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ async def get_change_with_merge_request(self, change_id: int) -> ChangeWithMerge
if change_in_db.type != ChangeType.MERGE_REQUEST:
raise ValueError(f"Change {change_id} is not a merge request change.")
assert change_in_db.merge_request_id is not None
assert change_in_db.merge_request_branch_name is not None

status = await self._hoster.get_merge_request_status(
incarnation_repository=incarnation_in_db.incarnation_repository,
Expand Down
1 change: 1 addition & 0 deletions tests/services/test_change.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ async def initialized_incarnation(
target_directory=".",
template_repository=git_repo_template,
commit_sha="dummy",
merge_request_id=None,
)


Expand Down

0 comments on commit 9d0dedc

Please sign in to comment.