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

Type hints #2619

Closed
wants to merge 43 commits into from
Closed

Type hints #2619

wants to merge 43 commits into from

Commits on Sep 25, 2024

  1. Configuration menu
    Copy the full SHA
    9e6bd8b View commit details
    Browse the repository at this point in the history
  2. Clarify that fake hidpp is used

    This module shouldn't be necessary on the long run. Remove pieces from
    it whenever possible.
    MattHag committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    f3ce935 View commit details
    Browse the repository at this point in the history
  3. Simplify setup with pathlib

    MattHag committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    e638250 View commit details
    Browse the repository at this point in the history
  4. Fix test coverage reporting

    MattHag committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    7b4d93a View commit details
    Browse the repository at this point in the history
  5. Introduce test coverage threshold

    Enforce a total coverage of 40% of the code.
    
    Related pwr-Solaar#1097
    MattHag committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    37f4be1 View commit details
    Browse the repository at this point in the history
  6. Setup reports and upload codecov

    Create coverage.xml, upload it to GitHub CI and visualize with codecov.
    
    Setup instruction:
    - Install codecov for project
      https://github.com/settings/installations/55029514
    - Add CODECOV_TOKEN in the GitHub CI project secrets
    
    Related pwr-Solaar#1097
    MattHag committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    ef54d28 View commit details
    Browse the repository at this point in the history
  7. Add code coverage badge

    MattHag committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    9e946a0 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    f6ac185 View commit details
    Browse the repository at this point in the history
  9. Make lr/desktop_notifications testable

    Introduce unit tests.
    
    Related pwr-Solaar#2273
    MattHag committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    be81eea View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    8db32bd View commit details
    Browse the repository at this point in the history
  11. Make ui/desktop_notifications testable

    Introduce unit tests.
    
    Related pwr-Solaar#2273
    MattHag committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    bc82f79 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    ef65d79 View commit details
    Browse the repository at this point in the history
  13. base: Simplify receiver info retrieval

    - Remove comments with unused receivers
    - Simplify receiver hardcoded info
    MattHag committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    823bf29 View commit details
    Browse the repository at this point in the history
  14. Replace global sw_id with function call

    Add test for it.
    MattHag committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    0212338 View commit details
    Browse the repository at this point in the history
  15. base: Add type hints

    MattHag committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    61a27d5 View commit details
    Browse the repository at this point in the history
  16. solaar: Add type hints

    MattHag committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    f4866f7 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    563d56a View commit details
    Browse the repository at this point in the history
  18. keysymdef: Rename key symbols

    Name the key symbol mapping different than the module itself.
    MattHag committed Sep 25, 2024
    Configuration menu
    Copy the full SHA
    337eb4a View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    c58075b View commit details
    Browse the repository at this point in the history
  20. Test coverage: Fix keysyms to be visible (#9)

    Fix typo in package name.
    MattHag authored Sep 25, 2024
    Configuration menu
    Copy the full SHA
    b127e6e View commit details
    Browse the repository at this point in the history

Commits on Sep 26, 2024

  1. Configuration menu
    Copy the full SHA
    b9eed6c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2182d90 View commit details
    Browse the repository at this point in the history
  3. hidapi: Explicitly load hidapi/udev implementation

    Linux uses udev, other platforms use the cross-platform hidapi
    implementation. Remove implicit loading of hidapi in hidapi/__init__.py.
    MattHag committed Sep 26, 2024
    Configuration menu
    Copy the full SHA
    2705f57 View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2024

  1. ui/about: Use Model-View-Presenter pattern for testability

    Split model and view, and enable view mocks for unit tests without GDK.
    MattHag committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    65d738f View commit details
    Browse the repository at this point in the history
  2. base_usb: Add external interface

    Clean up, type hint and tests base_usb and related modules.
    MattHag committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    be196b5 View commit details
    Browse the repository at this point in the history
  3. Fix about dialog

    MattHag committed Sep 27, 2024
    Configuration menu
    Copy the full SHA
    755d2f0 View commit details
    Browse the repository at this point in the history

Commits on Sep 28, 2024

  1. base: Add find_paired_node functions

    Avoid the need for hidapi imports and add them to the base API module.
    MattHag committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    96a801c View commit details
    Browse the repository at this point in the history
  2. base: Add find_paired_node functions

    Avoid direct access to hidapi and use the base module as low-level API
    instead. This change replaces the remaining calls to find_paired_node
    and find_paired_node_wpid by exposing them via base module.
    MattHag committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    a6ec5bf View commit details
    Browse the repository at this point in the history
  3. Add type hints and clean up

    MattHag committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    c04392b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    2ca2246 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8f82de6 View commit details
    Browse the repository at this point in the history
  6. receiver: Remove hard dependency on base

    With this test all receiver tests are macOS compatible again. The low
    level interface supports passing a fake API for unit tests.
    MattHag committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    42b7a48 View commit details
    Browse the repository at this point in the history
  7. Remove factory wrapper classes

    A module level function is sufficient, no wrapper needed.
    MattHag committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    36b7f63 View commit details
    Browse the repository at this point in the history
  8. Replace action strings with constants

    Avoids spelling mistakes and helps readability.
    MattHag committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    dec3f88 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    4cb7743 View commit details
    Browse the repository at this point in the history
  10. settings: Add tests

    MattHag committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    aaa324d View commit details
    Browse the repository at this point in the history
  11. ui/common: Introduce tests

    MattHag committed Sep 28, 2024
    Configuration menu
    Copy the full SHA
    353abb0 View commit details
    Browse the repository at this point in the history

Commits on Sep 30, 2024

  1. Fix warnings from automatic code inspections

    Warnings found by automatic code inspection and partially tackled
    - Drop distuitls inf favour of setuptools
    - Replace deprecated pyudev.Device.from_device_number
    - Remove unnecessary brackets
    - Avoid access to private variables etc.
    - Shadows built-in name
    - Line length >120 characters
    - Not a module level variable
    - Simplify clause
    and more
    MattHag committed Sep 30, 2024
    Configuration menu
    Copy the full SHA
    c8f0699 View commit details
    Browse the repository at this point in the history

Commits on Oct 2, 2024

  1. Introduce HIDAPI protocol

    Improve type hints and names.
    MattHag committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    1484717 View commit details
    Browse the repository at this point in the history
  2. base: Add more unit tests

    Make internal functions private.
    MattHag committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    9e10039 View commit details
    Browse the repository at this point in the history
  3. base: Remove hard dependency on gi

    Import gi solely for type checking.
    MattHag committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    d22b3f9 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    de872a2 View commit details
    Browse the repository at this point in the history
  5. diversion: Add type hints

    MattHag committed Oct 2, 2024
    Configuration menu
    Copy the full SHA
    0a962ec View commit details
    Browse the repository at this point in the history