diff --git a/mscxyz/score.py b/mscxyz/score.py index 9cdd60b..375c559 100644 --- a/mscxyz/score.py +++ b/mscxyz/score.py @@ -6,7 +6,6 @@ import difflib import os import shutil -import typing from pathlib import Path from typing import Any, Optional @@ -22,9 +21,6 @@ from mscxyz.style import Style from mscxyz.xml import Xml -if typing.TYPE_CHECKING: - from lxml.etree import _XPathObject - class Score: """This class holds basic file properties of the MuseScore score file. @@ -180,7 +176,7 @@ def get_version(self) -> float: :return: The version number as a float. :raises ValueError: If the version number cannot be retrieved. """ - version: _XPathObject = self.xml_root.xpath("number(/museScore[1]/@version)") + version = self.xml_root.xpath("number(/museScore[1]/@version)") if isinstance(version, float): return version raise ValueError("Could not get version number")