Skip to content

Commit

Permalink
Regroup PyCommon methods for consistency
Browse files Browse the repository at this point in the history
PyCommon's initialization and validation helpers are renamed and moved to near the top of the class, followed by simple accessors. Initialization methods are made static so there are no longer any implicit dependencies on which fields get initialized first.

Python import paths are now computed in the PyCommon constructor in order to follow the pattern of other provider fields. This requires passing the PythonSemantics to the constructor, so while I was at it I made PyCommon keep a reference to the semantics. I was a little concerned about this promoting increased coupling between PyCommon and PythonSemantics, but given that both classes serve essentially the same purpose I'm not too worried.

Work toward bazelbuild#7010, yak shaving for bazelbuild#6583 and bazelbuild#1446.

RELNOTES: None
PiperOrigin-RevId: 229425980
  • Loading branch information
brandjon authored and weixiao-huang committed Jan 31, 2019
1 parent 4b7680b commit d8c441f
Show file tree
Hide file tree
Showing 3 changed files with 244 additions and 233 deletions.
Loading

0 comments on commit d8c441f

Please sign in to comment.