Repository navigation
Conversation
…uninitialized variable The new version computes a fractional escape time, so the image has smooth shading, and it no longer reads the loop variable `active` after the loop.
|
Unit tests pass on the fork's CI for head commit 25dd25d (Python 3.10 and 3.x): https://github.com/hhoppe/mediapy/actions/runs/36083142417 |
…agnostics - Annotate list_audios and index the audios mapping through a cast, as show_videos already does for videos, removing the pyrefly pragma and three mypy strict errors. - Return Generator from _audio_via_local_file, like its sibling context managers, to avoid the deprecated contextmanager overload. - Use capture_html_string in the two new audio tests, removing three pyrefly pragmas.
|
After merging |
…me starting with a lowercase letter, and rename the one constant it now flags The unparenthesized alternation parsed as '^[a-z][a-z0-9]?' or '[A-Z]([A-Z_]*[A-Z])?$', and pylint matches from the start of the name, so the first branch accepted every lowercase-initial name, silently disabling invalid-name. With the anchors applied to both branches, pylint flags only the module-level constant new_file in mediapy_examples, renamed to NEW_FILE.
|
Added a fix for a precedence bug in |
This configures
pyreflyandruffinpyproject.tomland cleans up the code so that all five linters (pyrefly, ruff, mypy strict, pylint, pyink) run clean, while keeping mypy and pylint happy at the same time.Rather than adding a suppression per diagnostic, it fixes the underlying types:
pyrefly: ignorepragmas drop from 11 to 0 inmediapy/__init__.pyand from 30 to 2 inmediapy_test.py(the two that remain concernmatplotlib.cmstubs).mainitself does not lint clean: mypy strict reports 3 errors, pylint reportsE1101onfinfo.eps, and pyink would reformat both files. This branch is clean.Other changes:
pytype, which is no longer maintained, from the dev dependencies and the config.~/.cache/mypycache_dirsetting, which was a personal preference.target-versiontopy310; otherwise it infers all of py310..py315 and warns.No change in library functionality. All 209 tests pass under Python 3.10 (numpy 2.2.6) and 3.14.
This supersedes #86, which combined these changes with unrelated ones. It overlaps with the suppressions added in 849e6f4; cc @h-joo, since this is the fix-the-types alternative to that commit. I'm happy to adapt the audio-track support once it lands, if its new code needs the same treatment.
🤖 Generated with Claude Code