Comments (11)
Yeah, I always run the pep8
command on files I modify, and I try to follow it. Note that pep8 was revised for the first time this August: http://www.python.org/dev/peps/pep-0008/
Limiting comments and docstrings to 72 characters is something I always forget about though, and the pep8
command (at least the one I'm using) doesn't enforce this.
My vote is to follow the pep8 tool.
from toolz.
In that case, if @mrocklin is willing, I suggest a separate issue to install pep8 as part of the Travis CI build.
Meanwhile I’ll work on the pep8 fixes.
On Nov 8, 2013, at 10:09 AM, Erik Welch [email protected] wrote:
Yeah, I always run the pep8 command on files I modify, and I try to follow it. Note that pep8 was revised for the first time this August: http://www.python.org/dev/peps/pep-0008/
Limiting comments and docstrings to 72 characters is something I always forget about though, and the pep8 command (at least the one I'm using) doesn't enforce this.
My vote is to follow the pep8 tool.
—
Reply to this email directly or view it on GitHub.
from toolz.
Actually, the latest pep8 tool barfs on quite a bit more:
(toolz-env)10:51:01 toolz (lazy-remove) > conttest pep8 .
./bench/test_curry.py:5:1: E302 expected 2 blank lines, found 1
./bench/test_curry_baseline.py:6:1: E302 expected 2 blank lines, found 1
./bench/test_first.py:6:1: E302 expected 2 blank lines, found 1
./bench/test_get.py:5:1: E302 expected 2 blank lines, found 1
./bench/test_get_list.py:6:1: E302 expected 2 blank lines, found 1
./bench/test_sliding_window.py:5:1: E302 expected 2 blank lines, found 1
./bench/test_wordcount.py:8:1: E302 expected 2 blank lines, found 1
./bench/test_wordcount.py:14:1: E302 expected 2 blank lines, found 1
./doc/source/conf.py:6:80: E501 line too long (80 > 79 characters)
./doc/source/conf.py:14:11: E401 multiple imports on one line
./doc/source/conf.py:22:80: E501 line too long (80 > 79 characters)
./doc/source/conf.py:27:80: E501 line too long (80 > 79 characters)
./doc/source/conf.py:29:80: E501 line too long (81 > 79 characters)
./doc/source/conf.py:71:80: E501 line too long (80 > 79 characters)
./doc/source/conf.py:92:80: E501 line too long (80 > 79 characters)
./doc/source/conf.py:172:80: E501 line too long (80 > 79 characters)
./doc/source/conf.py:175:1: E122 continuation line missing indentation or outdented
./doc/source/conf.py:176:1: E122 continuation line missing indentation or outdented
./doc/source/conf.py:178:1: E122 continuation line missing indentation or outdented
./doc/source/conf.py:179:1: E122 continuation line missing indentation or outdented
./doc/source/conf.py:181:1: E122 continuation line missing indentation or outdented
./doc/source/conf.py:182:1: E122 continuation line missing indentation or outdented
./doc/source/conf.py:186:80: E501 line too long (80 > 79 characters)
./doc/source/conf.py:188:3: E121 continuation line indentation is not a multiple of four
./doc/source/conf.py:213:80: E501 line too long (80 > 79 characters)
./doc/source/conf.py:226:80: E501 line too long (80 > 79 characters)
./doc/source/conf.py:232:3: E121 continuation line indentation is not a multiple of four
./doc/source/conf.py:233:80: E501 line too long (82 > 79 characters)
./doc/source/conf.py:247:80: E501 line too long (80 > 79 characters)
./examples/fib.py:5:1: E302 expected 2 blank lines, found 1
./examples/graph.py:11:11: E221 multiple spaces before operator
./examples/graph.py:23:13: E221 multiple spaces before operator
./examples/wordcount.py:3:1: E302 expected 2 blank lines, found 1
./examples/wordcount.py:12:1: W391 blank line at end of file
./toolz/dicttoolz/tests/test_core.py:11:1: E302 expected 2 blank lines, found 1
./toolz/dicttoolz/tests/test_core.py:35:1: E303 too many blank lines (3)
./toolz/functoolz/__init__.py:1:80: E501 line too long (80 > 79 characters)
./toolz/functoolz/__init__.py:2:9: E128 continuation line under-indented for visual indent
./toolz/functoolz/tests/test_core.py:2:9: E128 continuation line under-indented for visual indent
./toolz/functoolz/tests/test_core.py:130:1: E302 expected 2 blank lines, found 1
./toolz/functoolz/tests/test_core.py:133:41: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
./toolz/itertoolz/core.py:97:80: E501 line too long (82 > 79 characters)
./toolz/itertoolz/core.py:182:18: E127 continuation line over-indented for visual indent
./toolz/itertoolz/core.py:253:1: E302 expected 2 blank lines, found 1
./toolz/itertoolz/core.py:288:1: E302 expected 2 blank lines, found 1
./toolz/itertoolz/tests/test_core.py:45:80: E501 line too long (95 > 79 characters)
./toolz/itertoolz/tests/test_core.py:46:80: E501 line too long (95 > 79 characters)
./toolz/itertoolz/tests/test_core.py:47:80: E501 line too long (83 > 79 characters)
./toolz/itertoolz/tests/test_core.py:50:80: E501 line too long (91 > 79 characters)
I don't mind fixing all these, but won't until we have agreement about the overall approach.
from toolz.
Do you want to require that the pep8 tool passses to pass the travis build test? It would be easy to do. I am supportive of generally following pep8. I would like to see the changes currently required to absolutely follow pep8. Actually, if there are rules we don't like for a file, configuring pep8 is actually really easy and really flexible.
An argument for following pep8 is, of course, having code that follows a consistent and already familiar style. This should make it easier for most people to read the code, and for new contributors to know what style to use. Plus, once pep8 is followed, it's easier to continue following it (like 100% coverage).
In other words, +1 from me, but lets see the changes before making any "big" decisions. @eigenhombre, if you clean up files, I can't see the work being for naught.
from toolz.
I also generally support PEP-8. There are rare cases when I don't think it's appropriate. For this reason I'm against rigidly asserting it in travis. I am for asking contributors to follow PEP-8.
I'm probably a major offender to the PEP-8 violations. I'll go through sometime this weekend and clean things up.
from toolz.
If you two feel strongly about this though please go ahead and add pep-8 to the travis script.
from toolz.
@mrocklin @eriknw what do you think about generally following PEP-8 and rigidly enforcing some agreed-upon subset of the rules? We could add PEP-8 to Travis with any number of exceptions. I think I’m happy w/ any exceptions but strongly feel we should add something automated as a requirement to pass checkin.
On Nov 8, 2013, at 12:52 PM, Matthew Rocklin [email protected] wrote:
If you two feel strongly about this though please go ahead and add pep-8 to the travis script.
—
Reply to this email directly or view it on GitHub.
from toolz.
+1, although I don't know offhand which warnings and errors we should ignore. A few other packages also use pep8 in this manner, but it doesn't appear to be common. Even though pep8 in total is viewed as a guideline, not a prescription, 90% of it is prescriptive and should be rigidly followed.
Be sure to add "--show-source" to the pep8 command to provide the best feedback to the user.
from toolz.
OK, ticket is #80.
On Nov 8, 2013, at 2:26 PM, Erik Welch [email protected] wrote:
+1, although I don't know offhand which warnings and errors we should ignore. A few other packages also use pep8 in this manner, but it doesn't appear to be common. Even though pep8 in total is viewed as a guideline, not a prescription, 90% of it is prescriptive and should be rigidly followed.
Be sure to add "--show-source" to the pep8 command to provide the best feedback to the user.
—
Reply to this email directly or view it on GitHub.
from toolz.
Matt, pls. assign to me if you no longer want this.
from toolz.
I'm not working on it tonight or early tomorrow but maybe tomorrow night?
Please beat me to it!
On Nov 9, 2013 5:47 PM, "John Jacobsen" [email protected] wrote:
Matt, pls. assign to me if you no longer want this.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/79#issuecomment-28138990
.
from toolz.
Related Issues (20)
- import issues with py311 HOT 7
- Combination of map and accumulate
- `thread_as` function ?? HOT 1
- Any good article/video/book/anything that shows how to use toolz for software development? HOT 1
- Idea: J-style forks HOT 6
- get_in function: add example of giving a string to the keys argument HOT 2
- Recipe: iterator wrapper that can be sorted or compared by the next value in the iterator HOT 4
- Idea: Compose class should be iterable HOT 2
- Support Python 3.11.0 HOT 2
- The "collect" decorator HOT 9
- include a wrapper for itertools.takewhile in (cy)toolz.curried
- 0.12.0: pytest is failing in `bench/test_wordcount.py::test_shakespeare` unit because missing bench/shakespeare.txt file
- Split two lists/iterables of objects "wanted_state", "existing_state" in 3 lists "create", "update", "delete" HOT 5
- Loss of typing information on composed functions HOT 2
- 'from tlz import curry' fails: ImportError: tlz.curry HOT 4
- Questions about Copilot + Open Source Software Hierarchy
- test_inspect_wrapped_property fails HOT 2
- Should we have dissoc_in ?
- Dictionary chunking / batching (inverting merge_with)
- Test failures with Python 3.13 HOT 3
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 toolz.