Am 02.01.2015 um 15:17 schrieb Sergey Kirpichev:
On Friday, January 2, 2015 11:39:09 AM UTC+3, Joachim Durchholz wrote:
2a) Should the rule be applied to continuation lines?
Typical case as found by me in the codebase:
a = self.fubar_the_worg(A, x) \
+ make_me_happy(x, y, z)
No errors here.
Okay, so your vote is "backslash continuation lines do not need to be
indented by multiples of four".
klaatu = self.barada_nikto(x, y, z,
a, b, c)
klaatu = self.barada_nikto(x, y, z,
a, b, c)
klaatu = self.barada_nikto(
x, y, z, a, b, c)
FYI: The only error here is the second example.
It's a bit unfortunate that these indents happened to be multiples of
four, so they're all non-erroneous no matter what...
So, what's your stance on the following:
# indent by 2
klaatu = self.barada_nikto(x, y, z,
a, b, c)
klaatu = self.barada_nikto(
x, y, z, a, b, c)
# indent by 7, matches the first operator on the line
klaatu = self.barada_nikto(x, y, z,
a, b, c)
klaatu = self.barada_nikto(
x, y, z, a, b, c)
2b) Should the rule be applied to comment lines?
Typical situations in our code base:
blah() # Here we need to blah()
# to avoid frobnication
blub(a, x, d, w + x + y + z)
# w2 + x + y + z
E116. Please note, that this error is not enabled in my
PR (and also E261 on the first line, that's
disabled too).
Does this mean that you think it should be flagged, or not?
If pep8.py can be made to do the tests in the way we want them done,
should we use it?
Sure. SymPy is about symbolic computer algebra, stylistic validators
out of the subject.
Vote noted.
4) How do we want to handle external dependencies in general?
E.g. pep8.py is currently exhibiting a bug that makes it unsuitable for
our purposes (this is likely to get fixed in the near future).
Just like we handle them now (or do this other projects, whatever). I.e. -
we should specify version requirements.
Vote noted.
4c) Installing dependencies through pip is not a hassle if SymPy itself
is installable through pip. Right now, SymPy is not prepared for that.
What's wrong with this?
$ pip install sympy
It's undocumented, i.e. it might not work anymore with the next SymPy
version.
Please do trivial checks for your claims.
(Please do not accuse based on an interpretation that wasn't intended by
the other side.)
4d) Should the code that needs the dependency (sympy for mpmath,
test_code_quality for pep8.py) run pip install?
Not in the case of test_code_quality.py. test_*.py - for testing,
not for installation of dependencies.
Vote noted.
Out of curiosity: What problems do you see with that?
--
You received this message because you are subscribed to the Google Groups
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sympy.
To view this discussion on the web visit
https://groups.google.com/d/msgid/sympy/54A726F8.90001%40durchholz.org.
For more options, visit https://groups.google.com/d/optout.