(cls, venv_dir)
| 46 | class InstallScopeState(object): |
| 47 | @classmethod |
| 48 | def load(cls, venv_dir): |
| 49 | # type: (str) -> InstallScopeState |
| 50 | |
| 51 | state_file = os.path.join(venv_dir, ".pex-venv-scope") |
| 52 | prior_state = None # type: Optional[InstallScope.Value] |
| 53 | try: |
| 54 | with open(state_file) as fp: |
| 55 | prior_state = InstallScope.for_value(fp.read().strip()) |
| 56 | except IOError as e: |
| 57 | if e.errno != errno.ENOENT: |
| 58 | raise e |
| 59 | |
| 60 | return cls(venv_dir=venv_dir, state_file=state_file, prior_state=prior_state) |
| 61 | |
| 62 | venv_dir = attr.ib() # type: str |
| 63 | _state_file = attr.ib() # type: str |
no test coverage detected