Skip to content
Snippets Groups Projects
Commit d2613f6d authored by Frederik Hennig's avatar Frederik Hennig
Browse files

fixed types

parent 2cb17b27
Branches
Tags
No related merge requests found
Pipeline #57564 passed with stages
in 2 minutes and 42 seconds
# mypy: strict_optional=False
from __future__ import annotations from __future__ import annotations
import sys
from typing import Sequence, Any from typing import Sequence, Any
from os import path from os import path
from enum import Enum, auto from enum import Enum, auto
...@@ -78,8 +79,7 @@ class SfgConfiguration: ...@@ -78,8 +79,7 @@ class SfgConfiguration:
self.source_extension = self.source_extension[1:] self.source_extension = self.source_extension[1:]
def override(self, other: SfgConfiguration): def override(self, other: SfgConfiguration):
other_dict = asdict(other) other_dict: dict[str, Any] = {k: v for k, v in asdict(other).items() if v is not None}
other_dict: dict[str, Any] = {k: v for k, v in other_dict.items() if v is not None}
return replace(self, **other_dict) return replace(self, **other_dict)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment