-
Notifications
You must be signed in to change notification settings - Fork 14
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
flake8 - primarily fix up imports #27
Conversation
@@ -21,7 +21,8 @@ def __init__(self): | |||
"There was a problem with your timestamp. Please check your current system time." | |||
"Server time is {0}.".format(time.time()) | |||
) | |||
self.auth_header = 'OAuth realm="API",oauth_problem=timestamp_refused&oauth_acceptable_timestamps={0}-{1}'.format( | |||
header_fmt = 'OAuth realm="API",oauth_problem=timestamp_refused&oauth_acceptable_timestamps={0}-{1}' |
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'd rather just replace this with an f-string if at all possible as we'll be requiring 3.6+
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.
Done.
from . import errors | ||
from .attributes import * |
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.
Won't find any arguments from me here.
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.
Think I should import the rest of the attributes from .attributes
(even the ones that aren't used in __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.
Eh, I'll leave that up to you. I'm not a huge fan of this type of root imports anyways.
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.
Okay- I'm thinking I should, since I think other packages use machinery
as an interface. I'll mark the import line noqa
.
Previously we imported `*` from `attributes`, so some values from that file may be used in other projects even though they are not used in this file, as it appears `machinery` is used as an interface for `attributes`.
*
inmachinery.__init__
This one might be a bit controversial. The
import *
is replaced with a pretty long list of imports, but the*
import obscured the fact that some base things likelogging
andabc
weren't being imported inmachinery.__init__
, they were coming in from theattributes
module. There are a few attributes that aren't explicitly imported here that I could add to the list if the intention is for this module to be an interface that subsumesattributes
.