Comments (14)
I understand but I fundamentally disagree with the amount of whitespace required by pep8.
from haigha.
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.
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.
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.
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.
I just fixed all pep8 errors except E501(line too long)
please see pull request here:
#51
from haigha.
Thank you. I wasn't ignoring this thread, just that work, family and heartbleed have gotten in the way.
from haigha.
A little late, but master is now pep8'ed.
from haigha.
from haigha.
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.
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.
You could use this trick: https://github.com/josegonzalez/beaver/blob/master/setup.py#L35
from haigha.
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.
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)
- Connection blocked by one consumer HOT 2
- cannot publish message to default exchange using gevent transport HOT 1
- Status of Blocking Socket Transport in Haigha HOT 1
- basic.consume doesn't return consumer_tag, so how to get it? HOT 1
- Unroutable message hangs haigha in publisher confirm mode HOT 4
- Can't get close_info from synchronous connection
- TypeError: getsockaddrarg() takes exactly 2 arguments (4 given) HOT 3
- Connection.transport_closed should set self._closed
- BasicClass.get return value is inconsistent in synchronous mode HOT 1
- Message frames might be interleaved when sending from multiple greenlets HOT 8
- Failed to parse timestamp in frame reader HOT 2
- Connection heartbeat arg description doesn't match implementation HOT 13
- Python3.4 support?
- Socket fds are leaked upon connection failure HOT 1
- Is it possible to connect on a rabbitmq cluster? HOT 4
- Haigha write "s" for short int value in tables instead of "U/u"
- Haigha crash when trying to deal with a message with empty body
- SyntaxError on fresh install with python 7 HOT 5
- Delivery tags in publisher confirm mode are not handled properly
- Synchronous basic.get with consumer=None is broken HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from haigha.