mirror of
https://github.com/qmk/qmk_firmware.git
synced 2025-01-19 00:03:33 +00:00
fix up for pytest
This commit is contained in:
parent
cddcd8d735
commit
52d3b9dcc5
@ -1,6 +1,5 @@
|
|||||||
"""Ensure text files have the proper line endings.
|
"""Ensure text files have the proper line endings.
|
||||||
"""
|
"""
|
||||||
from itertools import islice
|
|
||||||
from subprocess import DEVNULL
|
from subprocess import DEVNULL
|
||||||
|
|
||||||
from milc import cli
|
from milc import cli
|
||||||
|
@ -27,7 +27,7 @@ def xap_generate_docs(cli):
|
|||||||
with open(output_doc, "w", encoding='utf-8') as out_file:
|
with open(output_doc, "w", encoding='utf-8') as out_file:
|
||||||
out_file.write(output)
|
out_file.write(output)
|
||||||
|
|
||||||
output_doc = QMK_FIRMWARE / "docs" / f"xap_protocol.md"
|
output_doc = QMK_FIRMWARE / "docs" / "xap_protocol.md"
|
||||||
with open(output_doc, "w", encoding='utf-8') as out_file:
|
with open(output_doc, "w", encoding='utf-8') as out_file:
|
||||||
out_file.write('''\
|
out_file.write('''\
|
||||||
# XAP Protocol Reference
|
# XAP Protocol Reference
|
||||||
|
@ -66,7 +66,7 @@ def _append_routing_table_declaration(lines, container, container_id, route_stac
|
|||||||
for constant in container['return_constant']:
|
for constant in container['return_constant']:
|
||||||
lines.append(f' {constant},')
|
lines.append(f' {constant},')
|
||||||
|
|
||||||
lines.append(f'}};')
|
lines.append('}};')
|
||||||
|
|
||||||
elif container['return_type'] == 'string':
|
elif container['return_type'] == 'string':
|
||||||
constant = container['return_constant']
|
constant = container['return_constant']
|
||||||
@ -87,10 +87,10 @@ def _append_routing_table_declaration(lines, container, container_id, route_stac
|
|||||||
|
|
||||||
def _append_routing_table_entry_flags(lines, container, container_id, route_stack):
|
def _append_routing_table_entry_flags(lines, container, container_id, route_stack):
|
||||||
is_secure = 1 if ('secure' in container and container['secure'] is True) else 0
|
is_secure = 1 if ('secure' in container and container['secure'] is True) else 0
|
||||||
lines.append(f' .flags = {{')
|
lines.append(' .flags = {{')
|
||||||
lines.append(f' .type = {_get_route_type(container)},')
|
lines.append(f' .type = {_get_route_type(container)},')
|
||||||
lines.append(f' .is_secure = {is_secure},')
|
lines.append(f' .is_secure = {is_secure},')
|
||||||
lines.append(f' }},')
|
lines.append(' }},')
|
||||||
|
|
||||||
|
|
||||||
def _append_routing_table_entry_route(lines, container, container_id, route_stack):
|
def _append_routing_table_entry_route(lines, container, container_id, route_stack):
|
||||||
@ -145,7 +145,7 @@ def _append_routing_table_entry(lines, container, container_id, route_stack):
|
|||||||
if container['return_type'] == 'u32':
|
if container['return_type'] == 'u32':
|
||||||
_append_routing_table_entry_u32getter(lines, container, container_id, route_stack)
|
_append_routing_table_entry_u32getter(lines, container, container_id, route_stack)
|
||||||
|
|
||||||
lines.append(f' }},')
|
lines.append(' }},')
|
||||||
|
|
||||||
if condition:
|
if condition:
|
||||||
lines.append(f'#endif // {condition}')
|
lines.append(f'#endif // {condition}')
|
||||||
|
Loading…
Reference in New Issue
Block a user