Skip to content

Commit

Permalink
Clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef-Friedrich committed Jan 20, 2024
1 parent 05801fc commit 9b92d80
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions mscxyz/score.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
import difflib
import os
import shutil
import typing
from pathlib import Path
from typing import Any, Optional

Expand All @@ -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.
Expand Down Expand Up @@ -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")
Expand Down

0 comments on commit 9b92d80

Please sign in to comment.