Skip to content

Commit 6631dc0

Browse files
authored
fix: None default with bool type on load creates typing error (#7426)
* fix typing on load * fix docstring
1 parent 14233c0 commit 6631dc0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/datasets/load.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1507,7 +1507,7 @@ def dataset_module_factory(
15071507
Directory to read/write data. Defaults to `"~/.cache/huggingface/datasets"`.
15081508
15091509
<Added version="2.16.0"/>
1510-
trust_remote_code (`bool`, defaults to `False`):
1510+
trust_remote_code (`bool`, *optional*, defaults to `None`):
15111511
Whether or not to allow for datasets defined on the Hub using a dataset script. This option
15121512
should only be set to `True` for repositories you trust and in which you have read the code, as it will
15131513
execute code present on the Hub on your local machine.
@@ -1809,7 +1809,7 @@ def load_dataset_builder(
18091809
**Experimental**. Key/value pairs to be passed on to the dataset file-system backend, if any.
18101810
18111811
<Added version="2.11.0"/>
1812-
trust_remote_code (`bool`, defaults to `False`):
1812+
trust_remote_code (`bool`, *optional*, defaults to `None`):
18131813
Whether or not to allow for datasets defined on the Hub using a dataset script. This option
18141814
should only be set to `True` for repositories you trust and in which you have read the code, as it will
18151815
execute code present on the Hub on your local machine.
@@ -1920,7 +1920,7 @@ def load_dataset(
19201920
streaming: bool = False,
19211921
num_proc: Optional[int] = None,
19221922
storage_options: Optional[Dict] = None,
1923-
trust_remote_code: bool = None,
1923+
trust_remote_code: Optional[bool] = None,
19241924
**config_kwargs,
19251925
) -> Union[DatasetDict, Dataset, IterableDatasetDict, IterableDataset]:
19261926
"""Load a dataset from the Hugging Face Hub, or a local dataset.
@@ -2029,7 +2029,7 @@ def load_dataset(
20292029
**Experimental**. Key/value pairs to be passed on to the dataset file-system backend, if any.
20302030
20312031
<Added version="2.11.0"/>
2032-
trust_remote_code (`bool`, defaults to `False`):
2032+
trust_remote_code (`bool`, *optional*, defaults to `None`):
20332033
Whether or not to allow for datasets defined on the Hub using a dataset script. This option
20342034
should only be set to `True` for repositories you trust and in which you have read the code, as it will
20352035
execute code present on the Hub on your local machine.

0 commit comments

Comments
 (0)