Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ jobs:
max-parallel: 5
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
- '3.13'

name: test (${{ matrix.python-version }})
steps:
Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sphinx_rtd_theme==2.0.0
sphinxcontrib-apidoc
readthedocs-sphinx-search==0.3.2
recommonmark==0.7.1
jinja2==3.1.4
jinja2==3.1.6

# needed for sphinxcontrib-apidoc to do its thing
usb_protocol @ git+https://github.com/greatscottgadgets/python-usb-protocol.git
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@ name = "usb-protocol"
description = "Python library providing utilities, data structures, constants, parsers, and tools for working with the USB protocol."
license = { text = "BSD" }
readme = "README.md"
requires-python = ">=3.8"
requires-python = ">=3.9"
authors = [
{name = "Great Scott Gadgets", email = "dev@greatscottgadgets.com"},
]

classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Natural Language :: English",
Expand Down
4 changes: 2 additions & 2 deletions usb_protocol/emitters/descriptors/microsoft10.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def Property(self):
with d.Property() as p:
p.dwPropertyDataType = RegistryTypes.REG_EXPAND_SZ
p.PropertyName = "Icons"
p.PropertyData = "%SystemRoot%\system32\shell32.dll,-233"
p.PropertyData = "%SystemRoot%\\system32\\shell32.dll,-233"

This adds the relevant descriptor, automatically.
"""
Expand Down Expand Up @@ -232,7 +232,7 @@ def test_extended_properties_descriptor(self):
with d.Property() as p:
p.dwPropertyDataType = RegistryTypes.REG_EXPAND_SZ
p.PropertyName = "Icons"
p.PropertyData = "%SystemRoot%\system32\shell32.dll,-233"
p.PropertyData = "%SystemRoot%\\system32\\shell32.dll,-233"
with d.Property() as p:
p.dwPropertyDataType = RegistryTypes.REG_SZ
p.PropertyName = "Label"
Expand Down
11 changes: 10 additions & 1 deletion usb_protocol/emitters/descriptors/midi1.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,17 @@ def add_source(self, sourceId, sourcePin=1):
sourceDescriptor.BaSourcePin = sourcePin
self.add_subordinate_descriptor(sourceDescriptor)

def __setattr__(self, name, value):
if name == "iJack":
self._iJack = value
else:
return super().__setattr__(name, value)

def _pre_emit(self):
self.add_subordinate_descriptor(MidiOutJackDescriptorFootEmitter())
foot = MidiOutJackDescriptorFootEmitter()
if hasattr(self, "_iJack"):
foot.iJack = self._iJack
self.add_subordinate_descriptor(foot)
# Figure out the total length of our descriptor, including subordinates.
subordinate_length = sum(len(sub) for sub in self._subordinates)
self.bLength = subordinate_length + self.DESCRIPTOR_FORMAT.sizeof()
Expand Down