11from matplotlib import _api , cbook , widgets
2- from matplotlib .rcsetup import validate_stringlist
32import matplotlib .backend_tools as tools
43
54
@@ -175,8 +174,7 @@ def _remove_keys(self, name):
175174 for k in self .get_tool_keymap (name ):
176175 del self ._keys [k ]
177176
178- @_api .delete_parameter ("3.3" , "args" )
179- def update_keymap (self , name , key , * args ):
177+ def update_keymap (self , name , key ):
180178 """
181179 Set the keymap to associate with the specified tool.
182180
@@ -188,23 +186,15 @@ def update_keymap(self, name, key, *args):
188186 Keys to associate with the tool.
189187 """
190188 if name not in self ._tools :
191- raise KeyError ('%s not in Tools' % name )
189+ raise KeyError (f' { name } not in Tools' )
192190 self ._remove_keys (name )
193- for key in [key , * args ]:
194- if isinstance (key , str ) and validate_stringlist (key ) != [key ]:
195- _api .warn_deprecated (
196- "3.3" , message = "Passing a list of keys as a single "
197- "comma-separated string is deprecated since %(since)s and "
198- "support will be removed %(removal)s; pass keys as a list "
199- "of strings instead." )
200- key = validate_stringlist (key )
201- if isinstance (key , str ):
202- key = [key ]
203- for k in key :
204- if k in self ._keys :
205- _api .warn_external (
206- f'Key { k } changed from { self ._keys [k ]} to { name } ' )
207- self ._keys [k ] = name
191+ if isinstance (key , str ):
192+ key = [key ]
193+ for k in key :
194+ if k in self ._keys :
195+ _api .warn_external (
196+ f'Key { k } changed from { self ._keys [k ]} to { name } ' )
197+ self ._keys [k ] = name
208198
209199 def remove_tool (self , name ):
210200 """
0 commit comments