From 684546b6a5a50da5abd36b625d33aa412f6521c3 Mon Sep 17 00:00:00 2001 From: mferrera Date: Thu, 23 Nov 2023 09:11:56 +0100 Subject: [PATCH] CLN: Add types to _ecl_logi_head --- src/xtgeo/grid3d/_ecl_logi_head.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/xtgeo/grid3d/_ecl_logi_head.py b/src/xtgeo/grid3d/_ecl_logi_head.py index 3b99627f8..b4ce67a23 100644 --- a/src/xtgeo/grid3d/_ecl_logi_head.py +++ b/src/xtgeo/grid3d/_ecl_logi_head.py @@ -5,7 +5,7 @@ from ._ecl_output_file import Simulator -def lookup_optional_code(values, index): +def lookup_optional_code(values: list[bool], index: int) -> bool | None: if len(values) <= index: return None return values[index] @@ -54,7 +54,7 @@ class LogiHead: coal_bed_methane: bool | None = None @classmethod - def from_file_values(cls, values: list[bool], simulator: Simulator): + def from_file_values(cls, values: list[bool], simulator: Simulator) -> LogiHead: """Construct a LogiHead from the array following the LOGIHEAD keyword Args: values: The iterable of boolean values following the LOGIHEAD keyword