← Back to team overview

openerp-community team mailing list archive

Re: Proposal to add W0402 to Travis Style checking

 

On 11/13/2014 06:21 PM, Georges Racinet wrote:
> Hi Sandy,
>
> On 11/13/2014 06:13 PM, Sandy Carter wrote:
>> Following my proposed procedure, I am informing the community that we
>> intend to add a new style restriction [1].
>>
>>
>> W0402 deprecated-module:Used a module marked as deprecated is imported.
>>
>> Modules marked as deprecated: pdb,pudb,ipdb
>>
>> The reason behind this is that these are developement modules used to
>> pause code in the middle of execution in order to debug. They are not
>> intended for production but can be forgotten in the code and commited.
>> To catch these is necessary since it halt code execution and this is not
>> desired in production.
>> The implication of this is that any code with any of these modules will
>> fail on travis and be rejected by the reviewer.
> do you forbid pdb.set_trace() or the import of pdb and friends as a
> whole ?
> If that's the latter, I'd be firmly against it, since it also forbids
> very useful stuff, such as insertion of (optional, of course) pdb
> post_mortem calls.
> Of course if there's a way to bypass it with a # noqa comment or
> equivalent, this objection does not stand.

Forgot to conclude with what is obviously needed :
thank you and other people working on improving the quality ! This is
incredibly positive.

Regards,



Follow ups

References