From 13c30cfd467395628e9f9fb7585eacedb1fb55e8 Mon Sep 17 00:00:00 2001 From: Maximilien Rigaut Date: Sat, 30 Oct 2021 18:25:54 +0200 Subject: [PATCH] Checking the github actions --- setup.cfg | 9 ++++++--- src/midiRebind/mapping/GrandMA2.py | 4 +++- src/midiRebind/mapping/Yamaha.py | 4 +++- src/midiRebind/mapping/base.py | 2 +- src/midiRebind/mapping/colorplay.py | 1 + src/midiRebind/mapping/keystrokes.py | 1 + src/midiRebind/mapping/midiPageHandler.py | 8 +++++--- src/midiRebind/minitest | 2 +- src/midiRebind/panaremote | 2 +- src/midiRebind/pythonAnalogWay | 2 +- 10 files changed, 23 insertions(+), 12 deletions(-) diff --git a/setup.cfg b/setup.cfg index cabcb52..bd29a64 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,8 +13,9 @@ classifier = version=0.1a packages= midiRebind - midiRebind/panaremote - midiRebind/pythonAnalogWay +; midiRebind/panaremote +; midiRebind/pythonAnalogWay +; midiRebind/minitest install_requires= mido>=1.2.9 python-rtmidi>=1.4.1 @@ -35,4 +36,6 @@ testing = midiRebind=py.typed [flake8] -max-line-length=160 \ No newline at end of file +max-line-length=160 +select = E +extend-ignore = E \ No newline at end of file diff --git a/src/midiRebind/mapping/GrandMA2.py b/src/midiRebind/mapping/GrandMA2.py index 8cc6e9a..1e2e13b 100644 --- a/src/midiRebind/mapping/GrandMA2.py +++ b/src/midiRebind/mapping/GrandMA2.py @@ -1,3 +1,5 @@ +# mypy: ignore-errors + from src.midiRebind.mapping.base import BasicMessageParse,BasicActions,MatchError,BasicMidiInterface commandlist={1:"go",2:"stop",3:"resume",4:"timed_go",6:"set",7:"fire",10:"go_off"} @@ -66,7 +68,7 @@ class Actions(BasicActions): def __call__(self,match): "Make the link between the regex and the action" action=commandlist[int(match.command)] - id,value="1","1" + id,value=1,1 if action=="set": data=match.data page=int(data[1]) diff --git a/src/midiRebind/mapping/Yamaha.py b/src/midiRebind/mapping/Yamaha.py index 15582e3..824c0f2 100644 --- a/src/midiRebind/mapping/Yamaha.py +++ b/src/midiRebind/mapping/Yamaha.py @@ -1,3 +1,5 @@ +# mypy: ignore-errors + from src.midiRebind.mapping.base import BasicMessageParse,BasicActions,MatchError,BasicMidiInterface commandlist={127:"DCA",55:"IN",84:"MIX",101:"MATRICE",115:"MASTER",336:"MASTER2",122:"PAGE",53:"MUTE",893:"CUE"} @@ -49,7 +51,7 @@ class Actions(BasicActions): "Make the link between the regex and the action" # print(int(match.command)) action=commandlist[int(match.command)] - id,value="1","1" + id,value=1,1 page=0 # Yamaha consoles don't use pages in a way that is relevant to us #"DCA",55:"IN",84:"MIX",101:"MATRICE",115:"MASTER",82:"MASTER2",51:"PAGE" if action in ["IN","MIX","MATRICE","MASTER","MASTER2"]: diff --git a/src/midiRebind/mapping/base.py b/src/midiRebind/mapping/base.py index 3dcccc8..041c675 100644 --- a/src/midiRebind/mapping/base.py +++ b/src/midiRebind/mapping/base.py @@ -6,7 +6,7 @@ from math import trunc import mido import re import sys - +# mypy: ignore-errors # import traceback # print(traceback.print_stack()) diff --git a/src/midiRebind/mapping/colorplay.py b/src/midiRebind/mapping/colorplay.py index b2d814e..f968ab2 100644 --- a/src/midiRebind/mapping/colorplay.py +++ b/src/midiRebind/mapping/colorplay.py @@ -1,4 +1,5 @@ #!/bin/python3 +# mypy: ignore-errors # import pyautogui from src.midiRebind.mapping.base import BasicMidiInterface diff --git a/src/midiRebind/mapping/keystrokes.py b/src/midiRebind/mapping/keystrokes.py index 801e574..670a7d5 100644 --- a/src/midiRebind/mapping/keystrokes.py +++ b/src/midiRebind/mapping/keystrokes.py @@ -1,4 +1,5 @@ #!/bin/python3 +# mypy: ignore-errors ################################################# # HARDCODED DEFINITIONS diff --git a/src/midiRebind/mapping/midiPageHandler.py b/src/midiRebind/mapping/midiPageHandler.py index 3b8536b..77c9215 100644 --- a/src/midiRebind/mapping/midiPageHandler.py +++ b/src/midiRebind/mapping/midiPageHandler.py @@ -1,4 +1,6 @@ #!/bin/python3 +# mypy: ignore-errors + ########################### # IMPORTS import mido @@ -291,7 +293,7 @@ class midiPageHandler(object): if (self._changedbasevalues[linecol[0]][linecol[1]] & statusId): self._changedbasevalues[linecol[0]][linecol[1]] -= statusId - def hasStatus(self, statusId): + def hasStatus(self, linecol, statusId): "Check if a status is present" if (self._changedbasevalues[linecol[0]][linecol[1]] & statusId): return True @@ -393,7 +395,7 @@ class midiPageHandler(object): class pulseRackController(object): """Receive controls over a specific range and map them to commands to send""" - def __init__(self, returnInterface, ranges={j: j for j in range(3)}): + def __init__(self, returnInterface, ranges): self.ranges = ranges self.returnRanges = {i: j for j, i in ranges.items()} _ALL_MESSAGE_TYPES = [ @@ -560,7 +562,7 @@ class AkaiAPCMini(midiPageHandler): self.lightnote(note, val) def lightcolor(self, col, row, color): - self.light(col, row, val=_COLORS[color]) + self.light(col, row, val=self.colors[color]) def light(self, col, row, val=1): self.lightnote(self.findit(col, row), val) diff --git a/src/midiRebind/minitest b/src/midiRebind/minitest index 3198c7f..5b4d9ca 160000 --- a/src/midiRebind/minitest +++ b/src/midiRebind/minitest @@ -1 +1 @@ -Subproject commit 3198c7fa6016752b29ff36e3e221c1238d8cbd6b +Subproject commit 5b4d9ca9ed68cd946f093db574dceed1f7db5d7f diff --git a/src/midiRebind/panaremote b/src/midiRebind/panaremote index da14c2e..eac3f9f 160000 --- a/src/midiRebind/panaremote +++ b/src/midiRebind/panaremote @@ -1 +1 @@ -Subproject commit da14c2efb421b44a847a65262551fe5d901471c7 +Subproject commit eac3f9f4c393331af23cf05d732f0da5292599ab diff --git a/src/midiRebind/pythonAnalogWay b/src/midiRebind/pythonAnalogWay index c847c7f..7a4d53d 160000 --- a/src/midiRebind/pythonAnalogWay +++ b/src/midiRebind/pythonAnalogWay @@ -1 +1 @@ -Subproject commit c847c7fd889d81ab69b49d8220593ff78fa8fd07 +Subproject commit 7a4d53d497479824987bd4d580141ec177b57516