Skip to content

Commit 382a7fd

Browse files
authored
Merge branch 'main' into fix-license-deprecations
2 parents 0079b54 + e4e4ddd commit 382a7fd

2 files changed

Lines changed: 3 additions & 11 deletions

File tree

papermill/tests/test_adl.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def test_write_opens_file_and_writes_to_it(self):
5050
self.adl.write("hello world", "adl://foo_store.azuredatalakestore.net/path/to/file")
5151
self.fakeFile.write.assert_called_once_with(b"hello world")
5252

53-
@patch.object(adl_lib, 'auth', return_value="my_token")
53+
@patch.object(adl_lib, 'auth', return_value="my_token", create=True)
5454
@patch.object(adl_core, 'AzureDLFileSystem', return_value="my_adapter")
5555
def test_create_adapter(self, azure_dl_filesystem_mock, auth_mock):
5656
sut = ADL()

papermill/utils.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,9 @@ def nb_kernel_name(nb, name=None):
4040
Returns
4141
-------
4242
str
43-
The name of the kernel
44-
45-
Raises
46-
------
47-
ValueError
48-
If no kernel name is found or provided
43+
The name of the kernel or an empty string if none is found
4944
"""
50-
name = name or nb.metadata.get('kernelspec', {}).get('name')
51-
if not name:
52-
raise ValueError("No kernel name found in notebook and no override provided.")
53-
return name
45+
return name or nb.metadata.get('kernelspec', {}).get('name', '')
5446

5547

5648
def nb_language(nb, language=None):

0 commit comments

Comments
 (0)