forked from bokeh/bokeh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathutil.py
33 lines (25 loc) · 905 Bytes
/
util.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# -----------------------------------------------------------------------------
# Copyright (c) Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
# -----------------------------------------------------------------------------
"""
"""
from __future__ import annotations
# Standard library imports
import pickle
# Bokeh imports
from .config import Config
from .pipeline import StepType
__all__ = ("skip_for_prerelease",)
CONFIG_FILENAME = "bokeh-build-config.pickle"
def load_config() -> Config:
with open(CONFIG_FILENAME, "rb") as f:
return pickle.load(f)
def save_config(config: Config) -> None:
with open(CONFIG_FILENAME, "wb") as f:
pickle.dump(config, f)
def skip_for_prerelease(func: StepType) -> StepType:
func.skip_for_prerelease = True # type: ignore
return func