forked from NiklasRosenstein/python-docspec
-
Notifications
You must be signed in to change notification settings - Fork 0
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 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.
- Loading branch information
Showing
3 changed files
with
59 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "docspec-python" | ||
version = "2.0.2" | ||
version = "2.0.2+blib2to3" | ||
description = "A parser based on lib2to3 producing docspec data from Python source code." | ||
authors = ["Niklas Rosenstein <[email protected]>"] | ||
license = "MIT" | ||
|
@@ -12,6 +12,7 @@ packages = [{ include = "docspec_python", from="src" }] | |
python = "^3.7" | ||
docspec = "^2.0.2" | ||
"nr.util" = ">=0.7.0" | ||
black = "^23.1.0" | ||
|
||
[tool.poetry.dev-dependencies] | ||
mypy = "*" | ||
|
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