Skip to content

Commit

Permalink
chore(study-filesystem): correct type and awkwardness in implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent-laporte-pro committed Mar 9, 2024
1 parent 49aad28 commit 81751c5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion antarest/study/storage/rawstudy/ini_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def read(self, path: t.Any) -> JSON:
sections = self._parse_ini_file(f)
except FileNotFoundError:
# If the file is missing, an empty dictionary is returned.
# This is required tp mimic the behavior of `configparser.ConfigParser`.
# This is required to mimic the behavior of `configparser.ConfigParser`.
return {}

elif hasattr(path, "read"):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import shutil
from abc import ABC, abstractmethod
from http import HTTPStatus
from typing import Dict, List, Optional, Tuple, Union
from typing import List, Optional, Tuple, Union

from fastapi import HTTPException

Expand Down Expand Up @@ -208,6 +208,6 @@ def extract_child(self, children: TREE, url: List[str]) -> Tuple[List[str], List
for name in names:
if name not in children:
raise ChildNotFoundError(f"'{name}' not a child of {self.__class__.__name__}")
if type(children[name]) != child_class:
if not isinstance(children[name], child_class):
raise FilterError("Filter selection has different classes")
return names, sub_url

0 comments on commit 81751c5

Please sign in to comment.