Skip to content

Commit

Permalink
use typing.Self. Drop python3.10 support
Browse files Browse the repository at this point in the history
  • Loading branch information
tandav committed Feb 10, 2024
1 parent 889166c commit f7e092b
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python_version: ['3.10', '3.11', '3.12']
python_version: ['3.11', '3.12']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ authors = [
]
description = "set of tools to work with scales, modes, modulations, chord progressions, voice leading, rhythm and more"
readme = "README.md"
requires-python = ">=3.10"
requires-python = ">=3.11"
dependencies = [
"colortool>=0.5.3",
"opseq>=0.1.2",
Expand Down
4 changes: 1 addition & 3 deletions src/musiclib/interval.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import functools
from typing import TypeVar
from typing import Self

import numpy as np

from musiclib.util.cache import Cached

Self = TypeVar('Self', bound='AbstractInterval')


@functools.total_ordering
class AbstractInterval(Cached):
Expand Down
4 changes: 1 addition & 3 deletions src/musiclib/intervalset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

import pickle
from typing import TYPE_CHECKING
from typing import TypeVar

if TYPE_CHECKING:
from collections.abc import Iterator
from typing import Any
from typing import Self

import svg
import numpy as np
Expand All @@ -17,8 +17,6 @@
from musiclib.util.cache import Cached
from musiclib.util.etc import setdefault_path

Self = TypeVar('Self', bound='IntervalSet')


class IntervalSet(Cached, ReprSVGMixin):
def __init__(self, intervals: frozenset[AbstractInterval]) -> None:
Expand Down
5 changes: 1 addition & 4 deletions src/musiclib/noteset.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from collections.abc import Sequence
from typing import TYPE_CHECKING
from typing import Any
from typing import TypeVar
from typing import Self
from typing import overload

from musiclib import config
Expand All @@ -23,9 +23,6 @@
import svg


Self = TypeVar('Self', bound='NoteSet')


class NoteSet(Cached, ReprSVGMixin):
def __init__(self, notes: frozenset[Note]) -> None:
if not isinstance(notes, frozenset):
Expand Down
4 changes: 1 addition & 3 deletions src/musiclib/scale.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import pickle
from typing import TYPE_CHECKING
from typing import Any
from typing import TypeVar
from typing import Self

if TYPE_CHECKING:
from collections.abc import Iterator
Expand All @@ -20,8 +20,6 @@
from musiclib.util.cache import Cached
from musiclib.util.etc import setdefault_path

Self = TypeVar('Self', bound='Scale')


class Scale(Cached, ReprSVGMixin):
def __init__(self, root: Note, intervalset: IntervalSet) -> None:
Expand Down

0 comments on commit f7e092b

Please sign in to comment.