mirror of
https://github.com/mesonbuild/meson.git
synced 2026-11-06 05:16:42 +00:00
This replaces all of the Apache blurbs at the start of each file with an `# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing uses to be consistent in capitalization, and to be placed above any copyright notices. This removes nearly 3000 lines of boilerplate from the project (only python files), which no developer cares to look at. SPDX is in common use, particularly in the Linux kernel, and is the recommended format for Meson's own `project(license: )` field
23 lines
630 B
Python
23 lines
630 B
Python
# SPDX-License-Identifier: Apache-2.0
|
|
# Copyright 2021 The Meson development team
|
|
|
|
from pathlib import Path
|
|
import pickle
|
|
|
|
from .loaderbase import LoaderBase
|
|
from .model import ReferenceManual
|
|
|
|
class LoaderPickle(LoaderBase):
|
|
def __init__(self, in_file: Path) -> None:
|
|
super().__init__()
|
|
self.in_file = in_file
|
|
|
|
def load_impl(self) -> ReferenceManual:
|
|
res = pickle.loads(self.in_file.read_bytes())
|
|
assert isinstance(res, ReferenceManual)
|
|
return res
|
|
|
|
# Assume that the pickled data is OK and skip validation
|
|
def load(self) -> ReferenceManual:
|
|
return self.load_impl()
|