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

remove usage of OrderedDict #281

Merged
merged 3 commits into from
Jul 21, 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
9 changes: 4 additions & 5 deletions luma/core/cmdline.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
# -*- coding: utf-8 -*-
# Copyright (c) 2017-2022 Richard Hull and contributors
# Copyright (c) 2017-2024 Richard Hull and contributors
# See LICENSE.rst for details.

import atexit
import inspect
import argparse
import importlib
from collections import OrderedDict


def get_choices(module_name):
Expand Down Expand Up @@ -83,12 +82,12 @@ def get_interface_types():

def get_display_types():
"""
Get ordered dict containing available display types from available luma
Get ``dict`` containing available display types from available luma
sub-projects.

:rtype: collections.OrderedDict
:rtype: dict
"""
display_types = OrderedDict()
display_types = dict()
for namespace in get_supported_libraries():
display_types[namespace] = get_choices(f'luma.{namespace}.device')

Expand Down
4 changes: 2 additions & 2 deletions tests/test_bitmap_font.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2020 Richard Hull and contributors
# Copyright (c) 2020-2024 Richard Hull and contributors
# See LICENSE.rst for details.

"""
Expand Down Expand Up @@ -234,7 +234,7 @@ def test_load_sprite_table_exceptions_1():
with pytest.raises(FileNotFoundError) as ex:
filename = 'badfile'
bitmap_font.load_sprite_table(filename, range(16, 256), 5, (5, 8), (5, 8), FONTDATA['mappings'][1])
assert ex.value.filename == filename
assert Path(ex.value.filename).stem == filename


def test_load_sprite_table_exceptions_2():
Expand Down
Loading