Skip to content

Commit fe9a979

Browse files
committed
MAINT: update error message for space remove magic
1 parent b0d3143 commit fe9a979

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

jupyter_spaces/space.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class SpaceRegister:
55
__slots__ = ['_register']
66

77
def __init__(self):
8-
"""Initialise SpaceRegister instance."""
8+
"""Instantiate SpaceRegister."""
99
self._register = {}
1010

1111
@property
@@ -44,7 +44,7 @@ def remove_space(self, name):
4444
try:
4545
del self._register[name]
4646
except KeyError:
47-
raise RegistryError('Failed to forget space {name} because '
47+
raise RegistryError('Cannot remove space {name} because '
4848
'it does not exist'.format(name=name))
4949

5050
def remove_all_spaces(self):
@@ -56,7 +56,7 @@ class Space:
5656
__slots__ = ['_execution_namespace', '_name']
5757

5858
def __init__(self, name, outer_space):
59-
"""Initialise Space instance.
59+
"""Instantiate Space.
6060
6161
Args:
6262
name (str): Name of the space.
@@ -103,7 +103,7 @@ def execute(self, source):
103103
class ExecutionNamespace(dict):
104104

105105
def __init__(self, global_references, local_references):
106-
"""Initialise ExecutionNamespace instance.
106+
"""Instantiate ExecutionNamespace.
107107
108108
Args:
109109
global_references (dict): Global namespace.

tests/test_magics.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ def test_space_can_access_user_namespace_references(ip):
77
ip.run_cell_magic(magic_name='space', line='tomato', cell='x')
88

99

10-
def test_space_references_prioritised_over_user_namespace_references(ip):
10+
def test_space_references_prioritized_over_user_namespace_references(ip):
1111
ip.run_cell(raw_cell='x = 100')
1212
ip.run_cell_magic(magic_name='space', line='tomato',
1313
cell='x = 99; assert x == 99')
@@ -59,7 +59,7 @@ def test_space_cannot_add_user_namespace_references_using_global(ip):
5959
assert 'x' not in ip.user_global_ns
6060

6161

62-
def test_space_reference_assigments_persist_in_new_magic_call(ip):
62+
def test_space_reference_assignments_persist_in_new_magic_call(ip):
6363
ip.run_cell_magic(magic_name='space', line='tomato', cell='x = 99')
6464
ip.run_cell_magic(magic_name='space', line='tomato', cell='assert x == 99')
6565

@@ -71,7 +71,7 @@ def test_space_reference_deletions_persist_in_new_magic_call(ip):
7171
ip.run_cell_magic(magic_name='space', line='tomato', cell='x')
7272

7373

74-
def test_space_references_assigments_are_confined_in_one_space_only(ip):
74+
def test_space_references_assignments_are_confined_in_one_space_only(ip):
7575
ip.run_cell_magic(magic_name='space', line='tomato', cell='x = 99')
7676
ip.run_cell_magic(magic_name='space', line='potato', cell='x = 100')
7777
ip.run_cell_magic(magic_name='space', line='tomato', cell='assert x == 99')

0 commit comments

Comments
 (0)