Cleanup
This commit is contained in:
@@ -6,6 +6,7 @@ not a rhythmic boundary and must not be used to clip a group.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
import dataclasses
|
||||
import functools
|
||||
from fractions import Fraction as F
|
||||
|
||||
|
||||
@@ -48,6 +49,7 @@ def describe(pattern, *, origin=F(), source='', imported=False):
|
||||
return tuple(result)
|
||||
|
||||
|
||||
@functools.lru_cache(maxsize=8192)
|
||||
def valid(pattern):
|
||||
try:describe(pattern);return True
|
||||
except ValueError:return False
|
||||
|
||||
Reference in New Issue
Block a user