Skip to content
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
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ repos:
- id: check-merge-conflict
- id: debug-statements
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.2
rev: v0.16.3
hooks:
- id: ruff-check
args:
Expand Down
2 changes: 1 addition & 1 deletion examples/async.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async def run(worker) -> None:
# Just a busy waiting for event
# We need to keep communication with phone to get notifications
print("Press Ctrl+C to interrupt")
while 1:
while True:
try:
signal = await worker.get_signal_quality_async()
print(f"Signal is at {signal['SignalPercent']:d}%")
Expand Down
8 changes: 4 additions & 4 deletions examples/filesystem_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

def print_root_folders(state_machine) -> None:
file_obj = state_machine.GetNextRootFolder("")
while 1:
while True:
print(f"{file_obj['ID_FullName']} - {file_obj['Name']}")
try:
file_obj = state_machine.GetNextRootFolder(file_obj["ID_FullName"])
Expand Down Expand Up @@ -181,7 +181,7 @@ def main() -> None: # ruff: ignore[too-many-branches, too-many-statements, comp
# Check GetNextFileFolder
print("\n\nExpectation: Info for a file of the phone (cgi.jpg)")
file_f = state_machine.GetNextFileFolder(1)
while 1:
while True:
if file_f["Name"] != "cgi.jpg":
file_f = state_machine.GetNextFileFolder(0)
else:
Expand Down Expand Up @@ -216,7 +216,7 @@ def main() -> None: # ruff: ignore[too-many-branches, too-many-statements, comp
# Check GetFolderListing
print("\n\nExpectation: Listing of cgi.jpg's properties")
file_f = state_machine.GetFolderListing(args.folder, 1)
while 1:
while True:
if file_f["Name"] != "cgi.jpg":
file_f = state_machine.GetFolderListing(args.folder, 0)
else:
Expand Down Expand Up @@ -255,7 +255,7 @@ def main() -> None: # ruff: ignore[too-many-branches, too-many-statements, comp
# Check GetFolderListing again *wired*
print("\n\nExpectation: Print properties of newly created folder")
file_f = state_machine.GetFolderListing(args.folder, 1)
while 1:
while True:
if file_f["Name"] != "42alpha":
file_f = state_machine.GetFolderListing(args.folder, 0)
else:
Expand Down
2 changes: 1 addition & 1 deletion examples/incoming.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def main() -> None:
# Just a busy waiting for event
# We need to keep communication with phone to get notifications
print("Press Ctrl+C to interrupt")
while 1:
while True:
signal = state_machine.GetSignalQuality()
print(f"Signal is at {signal['SignalPercent']:d}%")
time.sleep(1)
Expand Down
2 changes: 1 addition & 1 deletion examples/sms_replier.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def main() -> None:

# We need to keep communication with phone to get notifications
print("Press Ctrl+C to interrupt")
while 1:
while True:
time.sleep(1)
status = state_machine.GetBatteryCharge()
print(f"Battery is at {status['BatteryPercent']:d}%")
Expand Down