Skip to content

Commit

Permalink
fixing warnings call/import
Browse files Browse the repository at this point in the history
  • Loading branch information
Natooz committed Nov 22, 2023
1 parent db77157 commit 5986bc2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion miditoolkit/midi/containers.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import re
import warnings
from dataclasses import dataclass
from typing import List, Optional, Union

Expand Down Expand Up @@ -285,7 +286,11 @@ def __init__(
self.pedals = [] if pedals is None else pedals

def remove_invalid_notes(self, verbose: bool = True) -> None:
warnings.warn("Call remove_notes_with_no_duration() instead.", DeprecationWarning)
warnings.warn(
"Call remove_notes_with_no_duration() instead.",
DeprecationWarning,
stacklevel=2,
)
return self.remove_notes_with_no_duration()

def remove_notes_with_no_duration(self) -> None:
Expand Down

0 comments on commit 5986bc2

Please sign in to comment.