Giter Site home page Giter Site logo

Comments (14)

awestendorf avatar awestendorf commented on August 16, 2024

I understand but I fundamentally disagree with the amount of whitespace required by pep8.

from haigha.

CrackerJackMack avatar CrackerJackMack commented on August 16, 2024

I guess the real question is -- Should a personal opinion about a community adopted standard take precedence for something that is made public?

I like Haigha, it's well written and easy to follow. Just very difficult to hack on or contribute to in it's current state.

from haigha.

awestendorf avatar awestendorf commented on August 16, 2024

Do you have an example of where that difficulty shows up? My read of the PEP8 intent is that project-specific conventions and readability take precedence over the conventions dictated for the standard library. I would love to see more community contributions so if there's a major blocking issue, that's a big deal to me.

from haigha.

CrackerJackMack avatar CrackerJackMack commented on August 16, 2024

https://gist.github.com/CrackerJackMack/9901819

find devel/haigha/ -type f -name '*.py' | grep -v tests | xargs flake8 --max-complexity=12 --statistics

796     E111 indentation is not a multiple of four
72      E121 continuation line indentation is not a multiple of four
6       E125 continuation line does not distinguish itself from next logical line
59      E127 continuation line over-indented for visual indent
22      E128 continuation line under-indented for visual indent
330     E201 whitespace after '['
342     E202 whitespace before ']'
87      E203 whitespace before ':'
1       E221 multiple spaces before operator
32      E225 missing whitespace around operator
16      E227 missing whitespace around bitwise or shift operator
25      E228 missing whitespace around modulo operator
72      E231 missing whitespace after ':'
4       E251 unexpected spaces around keyword / parameter equals
1       E261 at least two spaces before inline comment
11      E301 expected 1 blank line, found 0
32      E302 expected 2 blank lines, found 1
7       E303 too many blank lines (2)
3       E401 multiple imports on one line
100     E501 line too long (82 > 79 characters)
5       E502 the backslash is redundant between brackets
46      E701 multiple statements on one line (colon)
4       E711 comparison to None should be 'if cond is None:'
30      F401 'time' imported but unused
6       F403 'from haigha.frames import *' used; unable to detect undefined names
2       F841 local variable 'e' is assigned to but never used
3       W291 trailing whitespace
21      W293 blank line contains whitespace
4       W391 blank line at end of file

Using the right tooling (flake8 for example), everyone can work on a project without having to deal with style issues and instead logic and features.

If you are willing to accept a pull request for this I'll happily attempt it, but it will make the git history seem like I stole the project.

from haigha.

sudorandom avatar sudorandom commented on August 16, 2024

Here's a more visual representation of what a typical Python programmer sees:

If you want other Python programmers to contribute it seems like you're intentionally making it difficult for them by going against the grain. Effective Python programmers have this kind of tooling built into their editor and CI not only to potentially catch mistakes via the static analysis of flake8/pylint but also to stay in line with the community accepted style.

from haigha.

dehun avatar dehun commented on August 16, 2024

I just fixed all pep8 errors except E501(line too long)
please see pull request here:
#51

from haigha.

awestendorf avatar awestendorf commented on August 16, 2024

Thank you. I wasn't ignoring this thread, just that work, family and heartbleed have gotten in the way.

from haigha.

awestendorf avatar awestendorf commented on August 16, 2024

A little late, but master is now pep8'ed.

from haigha.

CrackerJackMack avatar CrackerJackMack commented on August 16, 2024

Smashing job sir

from haigha.

josegonzalez avatar josegonzalez commented on August 16, 2024

This commit breaks BC.

In previous versions, you could do:

from haigha.connections import RabbitConnection

Now this throws a lovely ImportError. Granted it's probably not the smarted thing to do the above, but we did indeed do this.

Here is what code should do:

from haigha.connections.rabbit_connection import RabbitConnection

Real-world bug with PR: seatgeek/amqp-dispatcher#13

Good effort though, I 👍 any move to PEP8 :)

from haigha.

awestendorf avatar awestendorf commented on August 16, 2024

Yeah, pep8 (or at least flake8) is very particular about importing into a module __init__ when the import goes unused. I strongly disagree with that, as I think there is a lot of value in hiding the full path of an implementation and loading only the necessary components into a more friendly namespace.

from haigha.

josegonzalez avatar josegonzalez commented on August 16, 2024

You could use this trick: https://github.com/josegonzalez/beaver/blob/master/setup.py#L35

from haigha.

vitaly-krugl avatar vitaly-krugl commented on August 16, 2024

Pylint has pragmas for disabling warnings on case-by-case. Can you do the same with flake8?

From: Aaron Westendorf <[email protected]mailto:[email protected]>
Reply-To: agoragames/haigha <[email protected]mailto:[email protected]>
Date: Wednesday, June 4, 2014 at 12:26 PM
To: agoragames/haigha <[email protected]mailto:[email protected]>
Subject: Re: [haigha] Haigha doesn't abide by PEP8 (#49)

Yeah, pep8 (or at least flake8) is very particular about importing into a module init when the import goes unused. I strongly disagree with that, as I think there is a lot of value in hiding the full path of an implementation and loading only the necessary components into a more friendly namespace.


Reply to this email directly or view it on GitHubhttps://github.com//issues/49#issuecomment-45139432.

from haigha.

awestendorf avatar awestendorf commented on August 16, 2024

I'm loathe to have any special rules just for haigha; I figure if there's a style guide that the community feels strongly about, then both the pros and the cons resulting from that spec must be acceptable to the community.

from haigha.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.