parameters: (self, lab_only=True)
docstring: Clear the packages/extensions.
docstring_summary: Clear the packages/extensions.
docstring_tokens: Clear the packages / extensions .
function: def clear_packages(self, lab_only=True):
          """Clear the packages/extensions.
          """
          data = self._data
          # Clear all dependencies
          if lab_only:
              # Clear all "@jupyterlab/" dependencies
              data['dependencies'] = _only_nonlab(data['dependencies'])
              data['resolutions'] = _only_nonlab(data['resolutions'])
              data['jupyterlab']['extensions'] = _only_nonlab(
                  data['jupyterlab']['extensions'])
              data['jupyterlab']['mimeExtensions'] = _only_nonlab(
                  data['jupyterlab']['mimeExtensions'])
              data['jupyterlab']['singletonPackages'] = _only_nonlab(
                  data['jupyterlab']['singletonPackages'])
          else:
              data['dependencies'] = {}
              data['resolutions'] = {}
              data['jupyterlab']['extensions'] = {}
              data['jupyterlab']['mimeExtensions'] = {}
              data['jupyterlab']['singletonPackages'] = []
function_tokens: def clear_packages ( self , lab_only = True ) : data = self . _data # Clear all dependencies if lab_only : # Clear all "@jupyterlab/" dependencies data [ 'dependencies' ] = _only_nonlab ( data [ 'dependencies' ] ) data [ 'resolutions' ] = _only_nonlab ( data [ 'resolutions' ] ) data [ 'jupyterlab' ] [ 'extensions' ] = _only_nonlab ( data [ 'jupyterlab' ] [ 'extensions' ] ) data [ 'jupyterlab' ] [ 'mimeExtensions' ] = _only_nonlab ( data [ 'jupyterlab' ] [ 'mimeExtensions' ] ) data [ 'jupyterlab' ] [ 'singletonPackages' ] = _only_nonlab ( data [ 'jupyterlab' ] [ 'singletonPackages' ] ) else : data [ 'dependencies' ] = { } data [ 'resolutions' ] = { } data [ 'jupyterlab' ] [ 'extensions' ] = { } data [ 'jupyterlab' ] [ 'mimeExtensions' ] = { } data [ 'jupyterlab' ] [ 'singletonPackages' ] = [ ]