(cls, key)
| 64 | |
| 65 | @classmethod |
| 66 | def _new_instance(cls, key): |
| 67 | obj = super().__new__(cls) |
| 68 | obj._key = key |
| 69 | obj._file_path = obj._find_tzfile(key) |
| 70 | |
| 71 | if obj._file_path is not None: |
| 72 | file_obj = open(obj._file_path, "rb") |
| 73 | else: |
| 74 | file_obj = _common.load_tzdata(key) |
| 75 | |
| 76 | with file_obj as f: |
| 77 | obj._load_file(f) |
| 78 | |
| 79 | return obj |
| 80 | |
| 81 | @classmethod |
| 82 | def from_file(cls, file_obj, /, key=None): |
no test coverage detected