Update requirements and resolve version incompatibilities - #1927
Open
mhucka wants to merge 9 commits into
Open
Conversation
In Lark version 1.3.1, `common.py` introduced a runtime `TypeError`: 1. Line 21 defines `_LexerArgType` as a string forward reference: ```python _LexerArgType: 'TypeAlias' = 'Union[Literal[...], Type[Lexer]]' ``` 2. Line 37 inside class `LexerConf` evaluates `lexer_type: _LexerArgType | None` 3. Because the module does not use from `__future__ import annotations`, Python evaluates `'Union[...]' | None` at module import time, raising an exception: ```python TypeError: unsupported operand type(s) for |: 'str' and 'NoneType' ``` 4. During pytest test collection, lark is imported by rfc3987_syntax, which is imported by jsonschema, which is imported by nbformat, and this import would fail with the error above.
This is the result of running `uv sync` after the changes to `pyproject.toml`.
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
In Matplotlib 3.10+, `Axes.legend()` strictly enforces that handles and labels must both be passed positionally or both as keyword arguments. In Cell 12 of resource_estimation.ipynb, an array of integers (`handles = np.arange(...))` was passed positionally alongside `labels=labels` as a keyword argument, triggering `TypeError: When passing handles and labels, they must both be passed positionally or both as keywords`.
mhucka
marked this pull request as ready for review
August 8, 2026 02:58
mhucka
requested review from
NoureldinYosri,
mpharrigan,
tanujkhattar and
wjhuggins
and removed request for
mpharrigan
August 8, 2026 02:59
Belongs in a separate PR.
Contributor
There was a problem hiding this comment.
Code Review
This pull request performs various cleanups and dependency updates, including fixing a relative link in the GitHub problem matchers documentation, pinning dash and lark versions in pyproject.toml to prevent import-time errors, removing unused imports across several modules, and updating a Jupyter Notebook to use matplotlib.colormaps instead of the deprecated matplotlib.cm.get_cmap. The reviewer pointed out critical syntax errors in the Jupyter Notebook's JSON structure where certain lines are missing opening double quotes, which would render the notebook file unparseable.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cloning the repository and doing a
uv syncproduced an environment where some tests failed locally. I suspect some third-party transitive dependencies may have changed recently. Resolving the failures required constraining two package versions inpyproject.toml. Following the addition of the constraints and refreshinguv.lock, a minor incompatibility arose involving a Matplotlib colormap function used in a notebook.