On Mon, 2015-06-15 at 06:19 -0400, Josef Skladanka wrote:
> > 
> > > > I'm not picking on Josef here - I'm sure I've submitted code 
> > > > recently
> > > > with lint errors, this was just the review I was looking at 
> > > > which
> > > > triggered the idea:
> > > > 
> > > > https://phab.qadevel.cloud.fedoraproject.org/D389
> 
> 
> No worries, I'm not taking it personaly. As I commented in the D389 - 
> the "not compliant" parts of the code were mostly in the spirit ofthe 
> rest of the code in the respective files (thus actually honoring the 
> PEP8 -https://www.python.org/dev/peps/pep-0008/#a-foolish-consistency
> -is-the-hobgoblin-of-little-minds ). Not saying that it is the best 
> though.
>  
> > > > exceptions that we'd want, I'm proposing that we use strict 
> > > > PEP8 with
> > > > almost no exceptions.
> 
> For me, strict PEP8 is next-to-unusable, and almost always leads to 
> code like this:
> 
> +                result = self.resultsdb.create_result(job_id=job_data['id'],
> +                                                      
> testcase_name=checkname,
> +                                                      outcome=detail.outcome,
> +                                                      summary=detail.summary
> +                                                      or None,
> +                                                      log_url=result_log_url,
> +                                                      item=detail.item,
> +                                                      
> type=detail.report_type,
> +                                                      **detail.keyvals
> +                                                      )

As I read it (of course IMBW), PEP-8 also allows for:

                result = self.resultsdb.create_result(
                    job_id=job_data['id'], testcase_name=checkname,
                    outcome=detail.outcome, summary=detail.summary or None,
                    log_url=result_log_url, item=detail.item,
                    type=detail.report_type, **detail.keyvals)

unless the next line would be indented, in which case you add one extra
level of indentation here. I use that style quite a bit in my stuff.

I do think it makes sense to be a bit less strict than PEP-8 for line
lengths especially when we have existing code that has been written to
longer lengths, though.

-- 
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net
http://www.happyassassin.net

_______________________________________________
qa-devel mailing list
qa-devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/qa-devel

Reply via email to