Repository navigation
Flake8 and source code cleanup - #109
Conversation
|
Personally as I tried to convey in #38, I would be in favour of stripping down the flake8 ignore we already have in setup.cfg rather than adding more. Here are the default ignore option from With the default flake8 warnings: I get only two flake8 violations which are quite easy to fix and do not seem very controversial to me: For completeness sake is the diff I would be in favour of (+ fixing the 2 flake8 violations): diff --git a/setup.cfg b/setup.cfg
index a42170f..d3913b0 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -7,22 +7,6 @@ license-file = LICENSE.txt
# https://flake8.readthedocs.io/en/latest/user/error-codes.html
# Note: there cannot be spaces after comma's here
-exclude = __init__.py
-ignore =
- # Extra space in brackets
- E20,
- # Multiple spaces around ","
- E231,E241,
- # Comments
- E26,
- # Import formatting
- E4,
- # Comparing types instead of isinstance
- E721,
- # Assigning lambda expression
- E731,
- # Ambiguous variable names
- E741
max-line-length = 120
[versioneer] |
|
If there is no strong reason to ignore all this, and no standard ignores defined for all the dask modules, then 👍 to @lesteve proposal. |
|
Fine by me
…On Tue, Jul 31, 2018 at 7:08 AM, Guillaume EB ***@***.***> wrote:
If there is no strong reason to ignore all this, and no standard ignores
defined for all the dask modules, then 👍 to @lesteve
<https://github.com/lesteve> proposal.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#109 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AASszNW5yUNQHyj8xnKTVSfcWGo_gWSSks5uMGTkgaJpZM4VkyS2>
.
|
|
@lesteve - sounds great. This is my preference as well. I will update accordingly. |
|
I am fine with keeping the original |
|
Oh yes please, max-line-length to 120 characters. It's not like we've got low-res small screens anymore. |
|
Checking in. What is the status on this? |
|
provided the tests pass here, I think this is now ready to merge. |
mrocklin
left a comment
There was a problem hiding this comment.
Some comments about the config changes.
|
|
||
| queue: regular | ||
| project: null # TODO, change me | ||
| project: PXYZ123 |
There was a problem hiding this comment.
I anticipate that people who don't pay attention won't change this. I slightly prefer leaving this as null so that they get an appropriate message about it.
There was a problem hiding this comment.
I would be fine dropping this detail
| processes: 9 # Number of Python processes per job | ||
| interface: ib0 # Network interface to use like eth0 or ib0 | ||
|
|
||
| queue: premium |
There was a problem hiding this comment.
Is this definitely the right queue for everyone? I'm inclined to leave these things out if they're not universally useful.
There was a problem hiding this comment.
No but this just an example and it tends to be what we use most often on this machine. Looking at the other deployments on this page, we seem to be okay with some user specific detail.
There was a problem hiding this comment.
Sounds good to me to have an as much as possible real example, so all except the project detail.
guillaumeeb
left a comment
There was a problem hiding this comment.
I don't like the too many line feeds here, was it due to the max-line-length parameter set to 80?
Just a minor concern though.
|
I would actually prefer sticking with 80 chars but 1) I'll get over it since there seems to be consensus among the other devs and 2) I've rolled back all line breaks that were between 80 and 120 chars in bad50ac. This may just be for demonstration or we can just go with it. |
|
FWIW my operational line length in most personal projects tends to be "80 characters except when it's inconvenient". |
|
No comment here though. I'm happy to stay out of this conversation :) |
|
Apparently I am the only one that prefers long lines, @lesteve was just fine keeping It is really a minor concern, so lets just keep it your way @jhamman! For the test failures here, I had some problems with this file and the last line when pushing to #107. |
|
This seems ready to merge. Since there were a few minor disagreements along the way on this one, I'll let @guillaumeeb or @lesteve have a final look. |
guillaumeeb
left a comment
There was a problem hiding this comment.
Some really minor comments, one about the max-line-length discussion, I'm really not sure about this one.
Other than that LGTM, thanks @jhamman.
|
|
||
| This centralzies calls out to the command line, providing consistent | ||
| outputs, logging, and an opportunity to go asynchronous in the future | ||
| This centralzies calls out to the command line, providing consistent outputs, logging, and an opportunity |
|
|
||
| def __init__(self, queue=None, project=None, resource_spec=None, walltime=None, job_extra=None, **kwargs): | ||
| def __init__(self, queue=None, project=None, resource_spec=None, | ||
| walltime=None, job_extra=None, **kwargs): |
There was a problem hiding this comment.
You still have some line breaks here and there, but this is not important.
| @@ -1,2 +1,4 @@ | |||
| # flake8: noqa | |||
There was a problem hiding this comment.
Why is there a noqa here? Do we need this import?
|
I pushed some tweaks to tackle @guillaumeeb's comment. Let's merge this one! I am happy to give a go to a max-line-length of 120 characters. More than happy to revisit this decision in a little while if we realise this is a problem in practice. |
|
Thanks a lot @jhamman! |
closes #38, closes #106
This uses the flake8 config from distributed and adds some boilerplate future imports.
Flake8 itself is being run in the
none.shbuild.