Skip to content
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

Ran black on project #379

Merged
merged 4 commits into from
Dec 18, 2019
Merged

Ran black on project #379

merged 4 commits into from
Dec 18, 2019

Conversation

WillAyd
Copy link
Contributor

@WillAyd WillAyd commented Dec 17, 2019

closes #364

After this would probably want to set up a CI rule to enforce. GitHub actions has a few if you wanted to use any of those:

https://github.com/marketplace?utf8=✓&type=actions&query=black

Otherwise could add to existing CI

@pep8speaks
Copy link

pep8speaks commented Dec 17, 2019

Hello @WillAyd! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 25:80: E501 line too long (85 > 79 characters)
Line 47:80: E501 line too long (85 > 79 characters)

Line 22:80: E501 line too long (86 > 79 characters)

Line 46:80: E501 line too long (86 > 79 characters)
Line 60:80: E501 line too long (85 > 79 characters)

Line 39:80: E501 line too long (81 > 79 characters)

Line 13:80: E501 line too long (87 > 79 characters)

Line 17:80: E501 line too long (82 > 79 characters)
Line 18:80: E501 line too long (86 > 79 characters)
Line 52:80: E501 line too long (87 > 79 characters)
Line 57:80: E501 line too long (86 > 79 characters)
Line 66:80: E501 line too long (83 > 79 characters)
Line 70:80: E501 line too long (82 > 79 characters)
Line 123:80: E501 line too long (80 > 79 characters)
Line 131:80: E501 line too long (80 > 79 characters)
Line 132:80: E501 line too long (83 > 79 characters)
Line 133:80: E501 line too long (86 > 79 characters)
Line 145:80: E501 line too long (87 > 79 characters)
Line 243:80: E501 line too long (82 > 79 characters)
Line 245:80: E501 line too long (86 > 79 characters)
Line 284:80: E501 line too long (87 > 79 characters)
Line 286:80: E501 line too long (82 > 79 characters)
Line 298:80: E501 line too long (83 > 79 characters)
Line 315:80: E501 line too long (81 > 79 characters)
Line 334:80: E501 line too long (85 > 79 characters)
Line 337:80: E501 line too long (87 > 79 characters)
Line 348:80: E501 line too long (82 > 79 characters)
Line 352:80: E501 line too long (86 > 79 characters)
Line 360:80: E501 line too long (82 > 79 characters)
Line 416:80: E501 line too long (83 > 79 characters)

Line 18:80: E501 line too long (86 > 79 characters)
Line 19:80: E501 line too long (84 > 79 characters)
Line 24:80: E501 line too long (88 > 79 characters)

Line 87:80: E501 line too long (80 > 79 characters)
Line 93:80: E501 line too long (86 > 79 characters)

Line 43:80: E501 line too long (82 > 79 characters)
Line 50:80: E501 line too long (81 > 79 characters)
Line 56:80: E501 line too long (82 > 79 characters)
Line 74:80: E501 line too long (86 > 79 characters)
Line 93:80: E501 line too long (81 > 79 characters)

Line 7:80: E501 line too long (87 > 79 characters)

Line 141:80: E501 line too long (83 > 79 characters)
Line 173:80: E501 line too long (83 > 79 characters)
Line 178:80: E501 line too long (85 > 79 characters)
Line 183:80: E501 line too long (85 > 79 characters)
Line 208:80: E501 line too long (85 > 79 characters)
Line 211:80: E501 line too long (85 > 79 characters)
Line 225:80: E501 line too long (87 > 79 characters)
Line 233:80: E501 line too long (86 > 79 characters)
Line 278:80: E501 line too long (86 > 79 characters)
Line 283:80: E501 line too long (83 > 79 characters)
Line 336:80: E501 line too long (84 > 79 characters)
Line 342:80: E501 line too long (80 > 79 characters)
Line 427:80: E501 line too long (83 > 79 characters)
Line 429:80: E501 line too long (85 > 79 characters)

Line 31:80: E501 line too long (88 > 79 characters)
Line 38:80: E501 line too long (87 > 79 characters)
Line 63:80: E501 line too long (80 > 79 characters)
Line 98:80: E501 line too long (82 > 79 characters)
Line 111:80: E501 line too long (81 > 79 characters)

Line 62:80: E501 line too long (86 > 79 characters)
Line 66:80: E501 line too long (85 > 79 characters)

Line 24:80: E501 line too long (83 > 79 characters)
Line 65:80: E501 line too long (85 > 79 characters)
Line 91:80: E501 line too long (85 > 79 characters)
Line 133:80: E501 line too long (86 > 79 characters)
Line 135:80: E501 line too long (82 > 79 characters)

Line 78:80: E501 line too long (86 > 79 characters)
Line 82:80: E501 line too long (86 > 79 characters)
Line 86:80: E501 line too long (84 > 79 characters)
Line 87:80: E501 line too long (82 > 79 characters)
Line 89:80: E501 line too long (88 > 79 characters)
Line 91:80: E501 line too long (81 > 79 characters)
Line 92:80: E501 line too long (81 > 79 characters)
Line 94:80: E501 line too long (87 > 79 characters)
Line 98:80: E501 line too long (81 > 79 characters)
Line 112:80: E501 line too long (86 > 79 characters)
Line 150:80: E501 line too long (81 > 79 characters)

Line 52:80: E501 line too long (81 > 79 characters)
Line 64:80: E501 line too long (81 > 79 characters)
Line 75:80: E501 line too long (84 > 79 characters)
Line 82:80: E501 line too long (82 > 79 characters)
Line 152:80: E501 line too long (88 > 79 characters)
Line 160:80: E501 line too long (82 > 79 characters)
Line 192:80: E501 line too long (83 > 79 characters)
Line 226:80: E501 line too long (88 > 79 characters)

Line 19:80: E501 line too long (80 > 79 characters)

Line 32:80: E501 line too long (87 > 79 characters)

Line 61:80: E501 line too long (81 > 79 characters)
Line 89:80: E501 line too long (83 > 79 characters)
Line 125:80: E501 line too long (83 > 79 characters)
Line 140:80: E501 line too long (83 > 79 characters)
Line 188:80: E501 line too long (80 > 79 characters)
Line 482:80: E501 line too long (84 > 79 characters)
Line 493:80: E501 line too long (88 > 79 characters)
Line 565:80: E501 line too long (80 > 79 characters)

Line 43:80: E501 line too long (85 > 79 characters)

Line 12:80: E501 line too long (81 > 79 characters)
Line 30:80: E501 line too long (83 > 79 characters)
Line 50:80: E501 line too long (87 > 79 characters)
Line 73:80: E501 line too long (83 > 79 characters)
Line 93:80: E501 line too long (83 > 79 characters)
Line 112:80: E501 line too long (88 > 79 characters)
Line 131:80: E501 line too long (81 > 79 characters)
Line 171:80: E501 line too long (86 > 79 characters)
Line 188:80: E501 line too long (87 > 79 characters)
Line 206:80: E501 line too long (84 > 79 characters)

Line 114:80: E501 line too long (84 > 79 characters)
Line 164:80: E501 line too long (82 > 79 characters)
Line 169:80: E501 line too long (84 > 79 characters)

Line 30:80: E501 line too long (82 > 79 characters)
Line 305:80: E501 line too long (80 > 79 characters)
Line 343:80: E501 line too long (86 > 79 characters)
Line 352:80: E501 line too long (81 > 79 characters)

Line 68:80: E501 line too long (84 > 79 characters)

Line 80:80: E501 line too long (82 > 79 characters)
Line 99:80: E501 line too long (81 > 79 characters)

Line 85:80: E501 line too long (86 > 79 characters)
Line 104:56: E231 missing whitespace after ','
Line 124:56: E231 missing whitespace after ','
Line 143:80: E501 line too long (87 > 79 characters)
Line 182:80: E501 line too long (80 > 79 characters)
Line 188:80: E501 line too long (84 > 79 characters)
Line 228:80: E501 line too long (83 > 79 characters)
Line 313:80: E501 line too long (86 > 79 characters)
Line 416:80: E501 line too long (83 > 79 characters)
Line 421:76: E231 missing whitespace after ','

Line 53:62: E231 missing whitespace after ','
Line 145:80: E501 line too long (86 > 79 characters)
Line 161:80: E501 line too long (84 > 79 characters)
Line 174:80: E501 line too long (88 > 79 characters)
Line 190:80: E501 line too long (88 > 79 characters)
Line 215:80: E501 line too long (88 > 79 characters)

Line 35:80: E501 line too long (85 > 79 characters)
Line 53:80: E501 line too long (84 > 79 characters)

Line 27:80: E501 line too long (88 > 79 characters)
Line 28:80: E501 line too long (85 > 79 characters)
Line 108:80: E501 line too long (86 > 79 characters)

Line 185:80: E501 line too long (81 > 79 characters)
Line 250:80: E501 line too long (88 > 79 characters)

Line 33:80: E501 line too long (87 > 79 characters)
Line 47:80: E501 line too long (86 > 79 characters)
Line 61:80: E501 line too long (81 > 79 characters)

Line 18:80: E501 line too long (89 > 79 characters)

Line 18:80: E501 line too long (81 > 79 characters)

Line 32:80: E501 line too long (81 > 79 characters)

Line 29:80: E501 line too long (83 > 79 characters)

Line 18:80: E501 line too long (80 > 79 characters)
Line 123:80: E501 line too long (80 > 79 characters)
Line 210:80: E501 line too long (86 > 79 characters)
Line 231:80: E501 line too long (82 > 79 characters)
Line 236:80: E501 line too long (88 > 79 characters)
Line 261:80: E501 line too long (84 > 79 characters)
Line 332:80: E501 line too long (82 > 79 characters)

Line 85:80: E501 line too long (83 > 79 characters)
Line 99:80: E501 line too long (81 > 79 characters)
Line 113:80: E501 line too long (81 > 79 characters)

Line 85:80: E501 line too long (83 > 79 characters)
Line 99:80: E501 line too long (81 > 79 characters)

Line 109:80: E501 line too long (83 > 79 characters)
Line 124:80: E501 line too long (81 > 79 characters)
Line 143:80: E501 line too long (81 > 79 characters)
Line 158:80: E501 line too long (81 > 79 characters)
Line 173:80: E501 line too long (81 > 79 characters)

Line 39:80: E501 line too long (87 > 79 characters)
Line 48:80: E501 line too long (80 > 79 characters)
Line 52:80: E501 line too long (81 > 79 characters)
Line 58:80: E501 line too long (80 > 79 characters)
Line 63:80: E501 line too long (87 > 79 characters)
Line 68:80: E501 line too long (81 > 79 characters)
Line 78:80: E501 line too long (87 > 79 characters)
Line 83:80: E501 line too long (81 > 79 characters)
Line 89:80: E501 line too long (80 > 79 characters)
Line 94:80: E501 line too long (87 > 79 characters)
Line 100:80: E501 line too long (84 > 79 characters)
Line 107:80: E501 line too long (80 > 79 characters)
Line 112:80: E501 line too long (87 > 79 characters)
Line 124:80: E501 line too long (80 > 79 characters)
Line 129:80: E501 line too long (87 > 79 characters)
Line 141:80: E501 line too long (80 > 79 characters)
Line 146:80: E501 line too long (87 > 79 characters)

Line 123:80: E231 missing whitespace after ','
Line 123:80: E501 line too long (83 > 79 characters)
Line 135:80: E501 line too long (84 > 79 characters)
Line 158:80: E501 line too long (80 > 79 characters)

Line 61:80: E501 line too long (80 > 79 characters)
Line 81:80: E501 line too long (88 > 79 characters)

Line 204:80: E501 line too long (88 > 79 characters)
Line 208:80: E501 line too long (88 > 79 characters)
Line 218:80: E501 line too long (88 > 79 characters)
Line 228:80: E501 line too long (88 > 79 characters)

Line 38:80: E501 line too long (86 > 79 characters)

Comment last updated at 2019-12-18 18:54:16 UTC

@WillAyd
Copy link
Contributor Author

WillAyd commented Dec 17, 2019

Hmm yea one other conflict - flake8 defaults to 79 characters per line whereas black is 88. I typically see people update the flake8 config to allow 88 but can go either way

@0golovatyi
Copy link
Contributor

@WillAyd we should have flake8/pep8 config file in the repo where the restrictions can be configured. 88 or even more characters per line seems more reasonable than 78 IMO.

return False, {}

login = row[0].lower()
if login in credentials:
logger.error(
f'Multiple entries for username {login} '
'in password file')
f"Multiple entries for username {login} " "in password file"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These 2 strings should be concatenated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice find. Yea this is one open issue with black when you first run on a code base

psf/black#26

from tabpy.tabpy_server.handlers.query_plane_handler import QueryPlaneHandler
from tabpy.tabpy_server.handlers.service_info_handler import ServiceInfoHandler
from tabpy.tabpy_server.handlers.status_handler import StatusHandler
from tabpy.tabpy_server.handlers.upload_destination_handler\
import UploadDestinationHandler
from tabpy.tabpy_server.handlers.upload_destination_handler import (
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like () and , can be removed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately can't do that without exceeding the 88 character line limit, so black makes this a multiline import

self.error_out(400, 'Script parameters need to be '
'provided as a dictionary.')
self.error_out(
400, "Script parameters need to be " "provided as a dictionary."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strings should be concatenated.

@0golovatyi 0golovatyi merged commit 26b34d9 into tableau:master Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Code Style: black
3 participants