twisted / pydoctor

This is pydoctor, an API documentation generator that works by static analysis.
https://pydoctor.readthedocs.io
Other
179 stars 48 forks source link

Avoid extra zealous parenthesis in colorized AST #711

Closed tristanlatr closed 1 year ago

tristanlatr commented 1 year ago
Capture d’écran, le 2023-05-30 à 19 25 42

Not all these parenthesis are required, it should display as:

1 << (10 | 1) << 1
tristanlatr commented 1 year ago

Here are the cpython tests for this issue: https://github.com/tristanlatr/cpython/blob/f90d3f68db720bd6d0deda8cc0030339ccd43858/Lib/test/test_unparse.py#L462