Skip to content

More future.input cleanup work - #2289

Merged
pushfoo merged 33 commits into
developmentfrom
input-manager-cleanup
Jul 22, 2024
Merged

pushfoo merged 33 commits into
developmentfrom
input-manager-cleanup

Conversation

@pushfoo

@pushfoo pushfoo commented Jul 21, 2024 •

Copy link
Copy Markdown
Member

TL;DR: Cleanup readability and support future improvements

Changes

  • Add utils.grow_sequence, supporting predicate functions, and tests for all of these
  • Start working on agreed-upon Xbox-style player pool
  • Various encapsulation, annotation, and doc improvements

Why

Slowly improving input manager quality will make it easier to heavily test cameras.

pushfoo added 30 commits July 20, 2024 12:35
* Add config loading helpers to utils

* Add tests for config loading helpers

* Add cross-references to doc for OneOrIterableOf
* Rename base Mapping class to InputMapping

* Rename input.mapping module to match the base type name

* Update imports
* Use _T | Iterable[_T]

* Remove _T2
@pushfoo
pushfoo merged commit ea1b391 into development Jul 22, 2024
@pushfoo
pushfoo deleted the input-manager-cleanup branch July 22, 2024 07:11
pvcraven added a commit that referenced this pull request Oct 8, 2026
* Make mypy and pyright fail CI, and fix their errors

Fixing the type errors turned up three crashes:
- Window subclasses that stored a camera as self.camera (platformer
  tutorial steps 7-19, custom_sprite, the lights tutorial) raised
  AttributeError on startup. Window.camera is pyglet's default camera.
  They now use self.world_camera, and assigning Window.camera explains.
- pixelated_ui() used pyglet 2 font filter attributes.
- InputManager.parse() called a function renamed in #2289. A file-wide
  type: ignore had hidden it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Sort the pyglet.enums import

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Paul V Craven <paul.craven@optimizley.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant