Closed The-Compiler closed 2 years ago
This is genuinely invalid syntax in the pytest docs' example code, but you're correct that shed
should handle that better.
Investigated this issue during mentored sprints at PyCon 2022. Reproduced the error by placing a syntax error in writing_plugins.rst and running shed over the file.
The invalid code block invoked pytest import handling in a way that created an error.
Spoke with Zac and determined the issue is not worth handling, and the current behavior is acceptable.
Thanks Glenn - this was surprisingly gnarly to track down, so I'm glad we got to the bottom of it 😃
With shed 0.9.5 and Python 3.10.4, running
shed --refactor
over pytest, I get: