[PATCH 2 of 3 file] [cc] flake8

Denis Laxalde denis.laxalde at logilab.fr
Tue Jun 12 16:50:22 CEST 2018


David Douard a écrit :
> # HG changeset patch
> # User David Douard <david.douard at logilab.fr>
> # Date 1528728153 -7200
> #      Mon Jun 11 16:42:33 2018 +0200
> # Node ID 1ceaa1c57915d20320f75de75bc051d961b3270a
> # Parent  8e0f644f384ac8e2be15c2fd223bd726347c0505
> [cc] flake8

Applied first two patches, thanks.

> diff --git a/cubicweb_file/ccplugin.py b/cubicweb_file/ccplugin.py
> --- a/cubicweb_file/ccplugin.py
> +++ b/cubicweb_file/ccplugin.py
> @@ -1,13 +1,11 @@
>  """cubicweb-ctl plugin providing the fsimport command
>  
>  :organization: Logilab
> -:copyright: 2010-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
> +:copyright: 2010-2018 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
>  :contact: http://www.logilab.fr/ -- mailto:contact at logilab.fr
>  """
> -__docformat__ = "restructuredtext en"
>  
>  from cubicweb.cwctl import CWCTL
> -
>  from cubicweb.toolsutils import Command
>  
>  
> @@ -26,12 +24,13 @@
>      arguments = '<instance id> <fs file or directory>...'
>      options = (
>          ("map-folders",
> -         {'short': 'F', 'action' : 'store_true',
> +         {'short': 'F', 'action': 'store_true',
>            'default': False,
> -          'help': 'map file-system directories as Folder entities (requires the `folder` cube).',
> +          'help': ('map file-system directories as Folder entities '
> +                   '(requires the `folder` cube).'),
>            }),
>          ("filed-under",
> -         {'short': 'u', 'type' : 'int',
> +         {'short': 'u', 'type': 'int',
>            'help': 'put imported file into the folder entity of the given eid.',
>            }),
>          )
> @@ -48,8 +47,9 @@
>          with cnx:
>              fsimport(cnx, args, parenteid=self.config.filed_under,
>                       mapfolders=self.config.map_folders,
> -                     bfss='data' in repo.system_source._storages.get('File', ()),
> -            )
> +                     bfss='data' in repo.system_source._storages.get(
> +                         'File', ()))
>              cnx.commit()
>  
> +
>  CWCTL.register(FSImportCommand)
> 


More information about the cubicweb-devel mailing list