Skip to content

Commit

Permalink
Fix mypy type error
Browse files Browse the repository at this point in the history
  • Loading branch information
LourensVeen committed Jul 17, 2024
1 parent 37bc3e1 commit e43b13e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions muscle3/profiling.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import sqlite3
from pathlib import Path
from typing import List, Optional, Tuple
from typing import cast, List, Optional, Tuple

import numpy as np
from matplotlib.axes import Axes
from matplotlib.figure import Figure
from matplotlib import pyplot as plt
from matplotlib.patches import Rectangle

Expand Down Expand Up @@ -237,7 +238,7 @@ def __init__(self, performance_file: Path) -> None:
ordered_names.insert(6, 'RUNNING')

ax.legend(ordered_artists, ordered_names, loc='upper right')
ax.figure.canvas.draw_idle()
cast(Figure, ax.figure).canvas.draw_idle()

def close(self) -> None:
"""Closes the database connection"""
Expand Down

0 comments on commit e43b13e

Please sign in to comment.