Skip to content

enh(python): Add support for Python 3.15 lazy import syntax#4398

Open
ZeroIntensity wants to merge 3 commits into
highlightjs:mainfrom
ZeroIntensity:python-lazy-imports
Open

enh(python): Add support for Python 3.15 lazy import syntax#4398
ZeroIntensity wants to merge 3 commits into
highlightjs:mainfrom
ZeroIntensity:python-lazy-imports

Conversation

@ZeroIntensity
Copy link
Copy Markdown

Changes

Support for lazy import/lazy from ... import ... in Python 3.15+. See PEP 810 for the specification.

Add lazy to the reserved names list to highlight it as a keyword. It is worth noting that this will also highlight cases where lazy is not an actual keyword (such as lazy = 42), but this seems to be the case for soft keywords already (match = 42 is also highlighted, for example).

Checklist

  • Added markup tests, or they don't apply here because...
  • Updated the changelog at CHANGES.md

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.

2 participants