-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Conversation
matrixbot: retest this please |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
generally this looks like a sane thing to be doing to me. I've asked some "why" questions but really they are just to satisfy my own curiosity; we shouldn't bikeshed this.
|
||
[isort] | ||
line_length = 89 | ||
not_skip = __init__.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whyso?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By default, isort skips init files. We put a lot of implementation code in init files, so we have to run them on it too.
@@ -19,3 +19,14 @@ max-line-length = 90 | |||
# W503 requires that binary operators be at the end, not start, of lines. Erik doesn't like it. | |||
# E203 is contrary to PEP8. | |||
ignore = W503,E203 | |||
|
|||
[isort] | |||
line_length = 89 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whyso?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To match our flake8 configuration, basically.
setup.cfg
Outdated
not_skip = __init__.py | ||
sections=FUTURE,STDLIB,COMPAT,THIRDPARTY,TWISTED,FIRSTPARTY,LOCALFOLDER | ||
default_section=THIRDPARTY | ||
known_first_party = synapse |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to include tests
in this too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch.
setup.cfg
Outdated
default_section=THIRDPARTY | ||
known_first_party = synapse | ||
known_compat = mock,six | ||
known_twisted=twisted,OpenSSL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not entirely convinced about putting mock, six, twisted and OpenSSL in separate groups. What's the thinking there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reasoning for six being separate is that when we go Py3 only, that compat section gets removed (as six isn't needed and mock is in the stdlib in py3).
Twisted being separate is basically aesthetics for me, I added it after a test run to see how it would look. Since we import so much from it, it just adds a bit of whitespace between all those imports and the other third party ones, otherwise the list can get pretty dense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
No description provided.