Skip to content

Commit 211d6e2

Browse files
committed
Small fixes
1 parent cd1bb4e commit 211d6e2

File tree

4 files changed

+10
-4
lines changed

4 files changed

+10
-4
lines changed

metaflow/plugins/events_decorator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class TriggerDecorator(FlowDecorator):
4343
4444
Parameters
4545
----------
46-
event : Union[str, Dict[str, Any]], default None
46+
event : Union[str, Dict[str, Any]], optional, default None
4747
Event dependency for this flow.
4848
events : List[Union[str, Dict[str, Any]]], default []
4949
Events dependency for this flow.

metaflow/plugins/kubernetes/kubernetes_decorator.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ class KubernetesDecorator(StepDecorator):
7171
the scheduled node should not have GPUs.
7272
gpu_vendor : str, default KUBERNETES_GPU_VENDOR
7373
The vendor of the GPUs to be used for this step.
74-
tolerations : List[str], default METAFLOW_KUBERNETES_TOLERATIONS
74+
tolerations : List[str], default []
75+
The default is extracted from METAFLOW_KUBERNETES_TOLERATIONS.
7576
Kubernetes tolerations to use when launching pod in Kubernetes.
7677
use_tmpfs : bool, default False
7778
This enables an explicit tmpfs mount for this step.

stubs/setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from setuptools import find_packages, setup
22

3-
version = "2.10.2"
3+
version = "2.10.8"
44

55
setup(
66
name="metaflow-stubs",

stubs/stub_generator.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ def exploit_default(default_value: Any) -> Optional[str]:
605605
buff.write(")" + ret_annotation + ":\n")
606606

607607
if doc is not None:
608-
buff.write('%s%s"""\n' % (indentation, TAB))
608+
buff.write('%s%sr"""\n' % (indentation, TAB))
609609
doc = cast(str, deindent_docstring(doc))
610610
init_blank = True
611611
for line in doc.split("\n"):
@@ -705,9 +705,14 @@ def write_out(self):
705705
+ "\n\n"
706706
)
707707
f.write("from __future__ import annotations\n\n")
708+
imported_typing = False
708709
for module in self._imports:
709710
f.write("import " + module + "\n")
711+
if module == "typing":
712+
imported_typing = True
710713
if self._typing_imports:
714+
if not imported_typing:
715+
f.write("import typing\n")
711716
f.write("if typing.TYPE_CHECKING:\n")
712717
for module in self._typing_imports:
713718
f.write(TAB + "import " + module + "\n")

0 commit comments

Comments
 (0)