[openstack-dev] [all][clients] Enable hacking in python-*clients

Kekane, Abhishek Abhishek.Kekane at nttdata.com
Tue Jan 19 09:58:53 UTC 2016



-----Original Message-----
From: Andreas Jaeger [mailto:aj at suse.com] 
Sent: 19 January 2016 15:19
To: OpenStack Development Mailing List (not for usage questions)
Subject: Re: [openstack-dev] [all][clients] Enable hacking in python-*clients

On 2016-01-19 10:44, Abhishek Kekane wrote:
>> Hi Abishek,
>
>> In my understanding, hacking check is enabled for most (or all) of
>
>> python-*client.
>
>> For example, flake8 is run for each neutronclient review [1].
>
>> test-requirements installs hacking, so I believe hacking check is enabled.
>
>> openstackclient and novaclient do the same [2] [3].
>
>> Am I missing something?
>
> Hi Akhiro Motoki,
>
> Individual OpenStack projects has separate hacking module (e.g.
> nova/hacking/checks.py) which contains additional rules other than 
> standard PEP8 errors/warnings.
>
> In similar mode can we do same in python-*clients?

Let's share one common set of rules and not have each repo additional ones. So, if those are useful, propose them for the hacking repo.

To answer your questions: Sure, it can be done but why?

Because we can encounter this issues in local environments only, also we can add custom checks like
1. use six.string_types instead of basestring 
2. use dict.items or six.iteritems(dict) instead of dict.items
3. checks on assertions etc.

Abhishek

Andreas
--
  Andreas Jaeger aj@{suse.com,opensuse.org} Twitter: jaegerandi
   SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
    GF: Felix Imendörffer, Jane Smithard, Graham Norton,
        HRB 21284 (AG Nürnberg)
     GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126


__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: OpenStack-dev-request at lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

______________________________________________________________________
Disclaimer: This email and any attachments are sent in strictest confidence
for the sole use of the addressee and may contain legally privileged,
confidential, and proprietary data. If you are not the intended recipient,
please advise the sender by replying promptly to this email and then delete
and destroy this email and any attachments without any further use, copying
or forwarding.



More information about the OpenStack-dev mailing list