-
-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pep8-ex-e402 compliance #338
Conversation
This seems like a sensible approach to move forward towards PEP8 compliant code. |
Thanks @martinholmer. I've been waffling on whether we should have a longer line length standard, perhaps 90. As we add policy reforms options in functions.py, we will need some English-descriptive-named variables that will be significantly longer than the e-codes. The number of odd continuations will only grow over time. we necessarily need to settle this question before this PR is merged, but I bring it up because it would be nice to have feedback of whether there are any other pep8 standards (like line length at 79) that might lead to harder-to-read and write code in the long run. I'll note that a significant portion of the Python standard library is not pep8 compliant, so, while I whole heartedly agree that the project is at a point where we need some standards, those standards do not necessarily have to exactly match pep8. |
For me the line-length-less-than-80-characters requirement in PEP8 is the I don't understand why using the built-in Python string concatenation |
On Sun, 9 Aug 2015, Matt Jensen wrote:
I agree that continued lines are hard to understand, and I often add dan |
@MattHJensen are you running as follows for this PR:
If yes, I get additional PEP8 errors on your branch. The only way I get no errors with this branch is:
Am I doing something incorrectly? |
- no errors on E402 E226 E241 E121 - pytest-pep8 plugin added - travis CI runs PEP8 tests
hmm.. I just created this PR against your branch Matt: https://github.com/MattHJensen/taxcalc/pull/3 |
OK, cool #339 passes Travis, but I'm not sure if the intention of this PR is just to have E402 be the only ignored PEP8 violation. If so, additional work must be done because, as far as I can see, there are still violations of E226, E241, and E121. |
Also, one consequence of 'Travis CI enforcement of (some form of) PEP8 compliance': all will have to run the PEP8 tests with:
or
to just run the PEP8 tests. If you just run |
Are not E226, E24, and E121, worth enforcing? What is the rationale for excluding these checks? |
@martinholmer the additional exceptions in my commit were just done because that is what was needed to pass the tests. My currently outstanding question to Matt is: do you intend that this PR brings the code in to PEP8 compliance except for E402? The information I have that is relevant to that question is as follows: this PR only brings the code into PEP8 compliance if you ignore E402, E226, E241, and E121 (as far as I can tell). I think that's a good thing to know. It seems like we have some choices on how to proceed:
|
TJ @talumbau, we have too many pull requests with comment streams in both! I agree completely with your analysis of the situation.
Otherwise, we need a discussion about what the rationale for excluding other PEP8 |
@talumbau and @martinholmer, my intent is to bring this branch into PEP8 compliance, only excluding E402. Interestingly, when I run But I do see the other errors when I follow @talumbau's suggestion and run
Visual inspection clearly indicates that the non E402 errors are indeed present, so I will add E402 ignore to my Sublime linter and add more commits to this branch. Coming today. |
@talumbau, could you please review and merge? Diagnostics tables verify that this PR doesn't change the results. |
Yes I think it would make sense to merge in https://github.com/MattHJensen/taxcalc/pull/3 for this PR, then change the setup.cfg to say
instead of the current list. Then we would know that TravisCI agrees with the statement "this set of code is PEP8 compliant minus E402" before merging. I can do this later today if you would like. |
PEP8 additions:
Alright @talumbau. just merged and updated setup.cfg. |
enthusiastic 👍 thanks for doing all the heavy lifting @MattHJensen |
@talumbau, could you merge if you're satisfied? PEP8 isn't a bad starting point, even if we decide to make some deviations later on. |
Deals with #328.
Replaces #329.
This is ready for review by @talumbau and @martinholmer.
The path forward would be: