File: mod.py

package info (click to toggle)
cloudpickle 3.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 544 kB
  • sloc: python: 3,315; sh: 9; makefile: 8
file content (21 lines) | stat: -rw-r--r-- 607 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
"""
In the distributed computing setting, this file plays the role of a "local
development" file, e.g. a file that is importable locally, but unimportable in
remote workers. Constructs defined in this file and usually pickled by
reference should instead flagged to cloudpickle for pickling by value: this is
done using the register_pickle_by_value api exposed by cloudpickle.
"""

import typing


def local_function():
    return "hello from a function importable locally!"


class LocalClass:
    def method(self):
        return "hello from a class importable locally"


LocalT = typing.TypeVar("LocalT")