git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Conforming to pep8

From
William Giokas <1007380@gmail.com>
Date
May 9, 2014, 03:57 UTC
Message-ID
<20140509035759.GA9051@wst420>
In-Reply-To
<536c3911ea173_741a161d310f2@nysa.notmuch>
On Thu, May 08, 2014 at 09:10:25PM -0500, Felipe Contreras wrote:
Show 13 quoted lines
> William Giokas wrote:
> > Which is a whole bunch of errors and warnings thrown by pep8. Is pep8
> > just getting put by the wayside? I would much rather have these
> > scripts conform to that and have an actual coding style rather than
> > just be a hodge-podge of different styles.
> 
> Personally I try to follow pep8 in git-remote-{hg,bzr}, but only to some
> extent.
> 
> I do this:
> 
>   [pep8]
>   ignore = E401,E302,E201,E202,E203,E126,E128

(So I haven't looked at git-remote-bzr, but I can comment on git-remote-hg)

Is there a reason for these?
E401: Multi-line imports seems like something that would just be
changing one line
E302: Blank lines don't seem to be that hard to do either. That can even
be automated quite reliably. It shouldn't detract from the readability,
juts makes the file a bit longer.

E20{1,2,3}: Extra whitespace is something that just makes things more consistent and readable.

E12{6,8}: continuation line indenting is another thing that helps consistency.

>   max-line-length = 160

The standard states that this should, at most, be increased to a value between 80 and 100.

Note that I'm not trying to yell, but these are just things that are set forth in pep8 but don't seem to be set at all in git-remote-hg. I really think that git's python 'bits' should be able to pass a default pep8 without issue.

> That said there's a couple of issues present that I didn't notice.
> Thanks for checking.

Hope to see some improvements! git-remote-hg is really quite useful for me, and I hope it can be as good as possible!

Thanks,
-- 
William Giokas | KaiSforza | http://kaictl.net/
GnuPG Key: 0x73CD09CF
Fingerprint: F73F 50EF BBE2 9846 8306  E6B8 6902 06D8 73CD 09CF
Previous: Felipe ContrerasNext: Felipe Contreras
Message 5 of 14 in “Conforming to pep8”
  1. William GiokasMay 9, 2014
  2. Jonathan NiederMay 9, 2014
  3. Michael HaggertyMay 9, 2014
  4. Felipe ContrerasMay 9, 2014
  5. William GiokasMay 9, 2014
  6. Felipe ContrerasMay 9, 2014
  7. William GiokasMay 9, 2014
  8. Felipe ContrerasMay 9, 2014
  9. William GiokasMay 9, 2014
  10. Felipe ContrerasMay 9, 2014
  11. William GiokasMay 9, 2014
  12. W. Trevor KingMay 9, 2014
  13. Felipe ContrerasMay 9, 2014
  14. John KeepingMay 9, 2014

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.