Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: update the CI to current versions #306

Merged
merged 3 commits into from
Dec 17, 2024
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,19 @@ env:

jobs:
meson_test:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
steps:
- name: Install dependencies
run: |
sudo apt-get update -yq
sudo apt-get install -yq --no-install-suggests --no-install-recommends $UBUNTU_PACKAGES
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: meson
run: meson builddir
- name: ninja
run: ninja -C builddir test
- name: capture build logs
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ always() }} # even if we fail
with:
name: meson logs
Expand Down
6 changes: 3 additions & 3 deletions tuhi/ble.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ def __init__(self, obj):
'''
self.obj = obj

assert(self.interface is not None)
assert(self.uuid is not None)
assert self.interface is not None
assert self.uuid is not None

self._property_callbacks = {}
self.interface.connect('g-properties-changed',
Expand Down Expand Up @@ -117,7 +117,7 @@ def __init__(self, om, obj):
self.om = om
self.logger = logger.getChild(self.address)

assert(self.interface is not None)
assert self.interface is not None

self.logger.debug(f'Device {self.objpath} - {self.name}')

Expand Down
4 changes: 2 additions & 2 deletions tuhi/dbusclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def property(self, name):
return p

def terminate(self):
del(self.proxy)
del self.proxy


class _DBusSystemObject(_DBusObject):
Expand Down Expand Up @@ -284,7 +284,7 @@ def _on_mgr_devices_updated(self, manager, pspec):
if d.address == self.address:
self.is_registering = False
self.manager.disconnect(self.s1)
del(self.s1)
del self.s1
logger.info(f'{self}: Registration successful')
self.emit('registered')

Expand Down
2 changes: 1 addition & 1 deletion tuhi/gui/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def orientation(self):

@orientation.setter
def orientation(self, orientation):
assert(orientation in ['landscape', 'portrait'])
assert orientation in ['landscape', 'portrait']
self._add_key('Device', 'Orientation', orientation)

@GObject.Property
Expand Down
14 changes: 7 additions & 7 deletions tuhi/protocol.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ def little_u16(x):
2-byte array, the return value is a 16-bit integer.
'''
if isinstance(x, int):
assert(x <= 0xffff and x >= 0x0000)
assert x <= 0xffff and x >= 0x0000
return x.to_bytes(2, byteorder='little')
else:
assert(len(x) == 2)
assert len(x) == 2
return int.from_bytes(x, byteorder='little')


Expand All @@ -82,10 +82,10 @@ def little_u32(x):
4-byte array, the return value is a 16-bit integer.
'''
if isinstance(x, int):
assert(x <= 0xffffffff and x >= 0x00000000)
assert x <= 0xffffffff and x >= 0x00000000
return x.to_bytes(4, byteorder='little')
else:
assert(len(x) == 4)
assert len(x) == 4
return int.from_bytes(x, byteorder='little')


Expand All @@ -96,10 +96,10 @@ def little_u64(x):
4-byte array, the return value is a 64-bit integer.
'''
if isinstance(x, int):
assert(x <= 0xffffffffffffffff and x >= 0x0000000000000000)
assert x <= 0xffffffffffffffff and x >= 0x0000000000000000
return x.to_bytes(8, byteorder='little')
else:
assert(len(x) == 8)
assert len(x) == 8
return int.from_bytes(x, byteorder='little')


Expand Down Expand Up @@ -1771,7 +1771,7 @@ def __str__(self):
if self.timestamp is not None:
t = time.strftime('%y%m%d%H%M%S', time.gmtime(self.timestamp))
else:
t = time.strftime(f'boot+{self.time_offset/1000}s')
t = time.strftime(f'boot+{self.time_offset / 1000}s')
return f'StrokeHeader: time: {t} new layer: {self.is_new_layer}, pen type: {self.pen_type}, pen id: {self.pen_id:#x}'


Expand Down
6 changes: 3 additions & 3 deletions tuhi/wacom.py
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ class WacomProtocolSpark(WacomProtocolBase):
orientation = 'portrait'

def __init__(self, device, uuid, protocol_version=ProtocolVersion.SPARK):
assert(protocol_version >= ProtocolVersion.SPARK)
assert protocol_version >= ProtocolVersion.SPARK
super().__init__(device, uuid, protocol_version=protocol_version)


Expand All @@ -734,7 +734,7 @@ class WacomProtocolSlate(WacomProtocolSpark):
orientation = 'portrait'

def __init__(self, device, uuid, protocol_version=ProtocolVersion.SLATE):
assert(protocol_version >= ProtocolVersion.SLATE)
assert protocol_version >= ProtocolVersion.SLATE
super().__init__(device, uuid, protocol_version=protocol_version)
device.connect_gatt_value(SYSEVENT_NOTIFICATION_CHRC_UUID,
self._on_sysevent_data_received)
Expand Down Expand Up @@ -808,7 +808,7 @@ class WacomProtocolIntuosPro(WacomProtocolSlate):
orientation = 'landscape'

def __init__(self, device, uuid, protocol_version=ProtocolVersion.INTUOS_PRO):
assert(protocol_version >= ProtocolVersion.INTUOS_PRO)
assert protocol_version >= ProtocolVersion.INTUOS_PRO
super().__init__(device, uuid, protocol_version=protocol_version)

@classmethod
Expand Down