Skip to content

Commit

Permalink
mypy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaspie committed Aug 30, 2024
1 parent 8b12668 commit cd1ba5e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/pynxtools/dataconverter/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import copy
import logging
import xml.etree.ElementTree as ET
from typing import Optional

import h5py
import numpy as np
Expand Down Expand Up @@ -247,7 +248,7 @@ def __nxdl_to_attrs(self, path: str = "/") -> dict:

return elem.attrib

def __nxdl_docs(self, path: str = "/") -> str:
def __nxdl_docs(self, path: str = "/") -> Optional[str]:
"""Get the NXDL docs for a path in the data."""

def extract_and_format_docs(elem: ET.Element) -> str:
Expand All @@ -260,7 +261,7 @@ def extract_and_format_docs(elem: ET.Element) -> str:
docs: str = ""

if not self.write_docs:
return
return None

nxdl_path = helpers.convert_data_converter_dict_to_nxdl_path(path)

Expand Down

0 comments on commit cd1ba5e

Please sign in to comment.