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 #7010, yak shaving for #6583 and #1446.

RELNOTES: None
PiperOrigin-RevId: 229425980
  • Loading branch information
brandjon authored and Copybara-Service committed Jan 15, 2019
1 parent cf4d89e commit 59038cd
Show file tree
Hide file tree
Showing 3 changed files with 244 additions and 233 deletions.
Loading

0 comments on commit 59038cd

Please sign in to comment.