Skip to content

Commit

Permalink
refactor(mtd): add list type hint for return of some methods
Browse files Browse the repository at this point in the history
Add type hint for returns of methods `get_af_list` and `get_ds_list` of class `MTDInstanceApi`.
  • Loading branch information
VincentCauchois committed Oct 29, 2024
1 parent 77fdd4f commit 08617c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/geonature/core/gn_meta/mtd/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def _get_xml(self, path):
def _get_af_xml(self):
return self._get_xml(self.af_path)

def get_af_list(self):
def get_af_list(self) -> list:
xml = self._get_af_xml()
_xml_parser = etree.XMLParser(ns_clean=True, recover=True, encoding="utf-8")
root = etree.fromstring(xml, parser=_xml_parser)
Expand All @@ -73,7 +73,7 @@ def get_af_list(self):
def _get_ds_xml(self):
return self._get_xml(self.ds_path)

def get_ds_list(self):
def get_ds_list(self) -> list:
xml = self._get_ds_xml()
return parse_jdd_xml(xml)

Expand Down

0 comments on commit 08617c1

Please sign in to comment.