Skip to content

Commit

Permalink
Add typing to key.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mscuthbert committed May 2, 2022
1 parent 79a8796 commit 3740e3b
Show file tree
Hide file tree
Showing 5 changed files with 169 additions and 96 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pythonpylint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ jobs:
- name: Type-check certain modules with mypy
run: |
mypy --follow-imports=silent music21/capella music21/common music21/corpus music21/features music21/figuredBass music21/humdrum music21/ipython21 music21/languageExcerpts music21/lily music21/mei music21/metadata music21/musedata music21/noteworthy music21/omr music21/romanText music21/test music21/vexflow
mypy --follow-imports=silent music21/articulations.py music21/bar.py music21/base.py music21/beam.py music21/clef.py music21/configure.py music21/defaults.py music21/derivation.py music21/duration.py music21/dynamics.py music21/editorial.py music21/environment.py music21/exceptions21.py music21/expressions.py music21/freezeThaw.py music21/harmony.py music21/instrument.py music21/interval.py music21/layout.py music21/percussion.py music21/prebase.py music21/repeat.py music21/roman.py music21/serial.py music21/sieve.py music21/sites.py music21/sorting.py music21/spanner.py music21/style.py music21/tablature.py music21/tempo.py music21/text.py music21/tie.py music21/tinyNotation.py music21/variant.py music21/voiceLeading.py music21/volpiano.py music21/volume.py
mypy --follow-imports=silent music21/articulations.py music21/bar.py music21/base.py music21/beam.py music21/clef.py music21/configure.py music21/defaults.py music21/derivation.py music21/duration.py music21/dynamics.py music21/editorial.py music21/environment.py music21/exceptions21.py music21/expressions.py music21/freezeThaw.py music21/harmony.py music21/instrument.py music21/interval.py music21/key.py music21/layout.py music21/percussion.py music21/prebase.py music21/repeat.py music21/roman.py music21/serial.py music21/sieve.py music21/sites.py music21/sorting.py music21/spanner.py music21/style.py music21/tablature.py music21/tempo.py music21/text.py music21/tie.py music21/tinyNotation.py music21/variant.py music21/voiceLeading.py music21/volpiano.py music21/volume.py
3 changes: 2 additions & 1 deletion music21/common/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# License: BSD, see license.txt
# ------------------------------------------------------------------------------
from fractions import Fraction
from typing import Union, TypeVar, TYPE_CHECKING, Iterable, Type
from typing import Union, TypeVar, TYPE_CHECKING, Iterable, Type, Literal

from music21.common.enums import OffsetSpecial

Expand All @@ -23,3 +23,4 @@
StreamType = TypeVar('StreamType', bound='music21.stream.Stream')
M21ObjType = TypeVar('M21ObjType', bound='music21.base.Music21Object')
ClassListType = Union[str, Iterable[str], Type[M21ObjType], Iterable[Type[M21ObjType]]]
StepName = Literal['C', 'D', 'E', 'F', 'G', 'A', 'B']
Loading

0 comments on commit 3740e3b

Please sign in to comment.