-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use blib2to3 parser from
black
package to support match statement (#80
) * Use blib2to3 parser to support match statement The built-in lib2to3 does not support pattern matching (Python 3.10+): https://docs.python.org/3.11/library/2to3.html#module-lib2to3 The [black][] project managed to get some level of parsing support for `match` out of their modified version `blib2to3`, see: 1. psf/black#2242 2. psf/black#2586 [black]: https://github.com/psf/black This change adds `black` as a dependency and switches to using `blib2to3` to parse. Tests pass, but that's all that's been attempted thus far. * Add a _unreleased changelog for blib2to3 integration * fix mypy in docspec/src/docspec/__init__.py * fix mypy * update changelog format * update GitHub workflow * fix workflow * insert PR url * use `--no-venv-check` also for `slap run` in docs job --------- Co-authored-by: Niklas Rosenstein <rosensteinniklas@gmail.com>
- Loading branch information
1 parent
6569b0e
commit 1db8d16
Showing
7 changed files
with
365 additions
and
77 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[[entries]] | ||
id = "8628524b-3376-45db-a676-240b00c20d08" | ||
type = "fix" | ||
description = "Swap in `blib2to3` parser (bundled with the `black` package) for the stdlib `lib2to3` module in order to support `match` statements (PEP 634 - Structural Pattern Matching)." | ||
author = "@nrser" | ||
pr = "https://github.com/NiklasRosenstein/docspec/pull/80" |
This file contains 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
This file contains 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
Oops, something went wrong.