(cls, content)
| 92 | |
| 93 | @classmethod |
| 94 | def from_json(cls, content): |
| 95 | # type: (Union[bytes, Text]) -> PexInfo |
| 96 | if isinstance(content, bytes): |
| 97 | content = content.decode("utf-8") |
| 98 | return cls(info=json.loads(content)) |
| 99 | |
| 100 | @classmethod |
| 101 | def from_env(cls, env=ENV): |