From 9b92d802dd06a88d5ef016bf943db6df91dcef91 Mon Sep 17 00:00:00 2001 From: Josef Friedrich Date: Sat, 20 Jan 2024 18:46:16 +0100 Subject: [PATCH] Clean up --- mscxyz/score.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) 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")