MCPcopy Index your code
hub / github.com/ipython/ipython / unalias

Method unalias

IPython/core/magics/osm.py:184–198  ·  view source on GitHub ↗

Remove an alias

(self, parameter_s='')

Source from the content-addressed store, hash-verified

182
183 @line_magic
184 def unalias(self, parameter_s=''):
185 """Remove an alias"""
186
187 aname = parameter_s.strip()
188 try:
189 self.shell.alias_manager.undefine_alias(aname)
190 except ValueError as e:
191 print(e)
192 return
193
194 stored = self.shell.db.get('stored_aliases', {} )
195 if aname in stored:
196 print("Removing %stored alias",aname)
197 del stored[aname]
198 self.shell.db['stored_aliases'] = stored
199
200 @line_magic
201 def rehashx(self, parameter_s=''):

Callers

nothing calls this directly

Calls 2

undefine_aliasMethod · 0.80
getMethod · 0.80

Tested by

no test coverage detected