Simplify logic in PythonConfig.InstructionsForPhase()
The diff looks big, but the logical changes are small and were done in
this order:
-
Check right away if version or requirements are not specified.
Those two are required to activate the Python builder. Old commit
messages indicate that this was always the intended behavior.[0] -
In code after the initial check, replaced all "pc.Requirements != nil"
with "true" since we know that it is definitely true. -
Removed any resulting 'if true' or 'if true || ...' expressions and
de-indented their bodies.
This makes it much easier to understand the flow through this method,
especially the pc.usePoetry() conditionals.
[0] This did affect a test case, which I updated. I believe the new
behavior is more correct.
Related MRs:
- !83 (merged)
- !82 (merged)
- !80 (merged) (This MR)
- main