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

Fixed PEP8 conformance. #368

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

jcbertin
Copy link
Contributor

@jcbertin jcbertin commented Oct 9, 2017

Fixed code formatting to comply with PEP8 and some other warnings.

@jcbertin jcbertin force-pushed the pep8-conformance branch 2 times, most recently from cef5bd0 to 6362818 Compare November 29, 2018 22:38
@@ -12,8 +12,8 @@
from dateutil.tz import tzutc
from inspect import getargspec
from pynamodb.constants import (
STRING, STRING_SHORT, NUMBER, BINARY, UTC, DATETIME_FORMAT, BINARY_SET, STRING_SET, NUMBER_SET,
MAP, MAP_SHORT, LIST, LIST_SHORT, DEFAULT_ENCODING, BOOLEAN, ATTR_TYPE_MAP, NUMBER_SHORT, NULL, SHORT_ATTR_TYPES
Copy link
Contributor

Choose a reason for hiding this comment

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

Which PEP-8 rule is this?

@@ -54,7 +54,7 @@ def __set__(self, instance, value):
attr_name = instance._dynamo_to_python_attrs.get(self.attr_name, self.attr_name)
instance.attribute_values[attr_name] = value

def __get__(self, instance, owner):
def __get__(self, instance, unused_owner):
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm a bit concerned about changing function signatures like this. Also, which tool enforces this for you?

@@ -16,7 +16,7 @@ def __init__(self, exc):
def __enter__(self):
return self

def __exit__(self, exc_type, exc_value, exc_tb):
def __exit__(self, exc_type, exc_value, unused_exc_tb):
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

@@ -25,10 +25,10 @@
from pynamodb.constants import (
RETURN_CONSUMED_CAPACITY_VALUES, RETURN_ITEM_COLL_METRICS_VALUES, COMPARISON_OPERATOR_VALUES,
RETURN_ITEM_COLL_METRICS, RETURN_CONSUMED_CAPACITY, RETURN_VALUES_VALUES, ATTR_UPDATE_ACTIONS,
COMPARISON_OPERATOR, EXCLUSIVE_START_KEY, SCAN_INDEX_FORWARD, SCAN_FILTER_VALUES, ATTR_DEFINITIONS,
Copy link
Contributor

Choose a reason for hiding this comment

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

unused import?

max_consecutive_exceptions=None,
consistent_read=None,
index_name=None):
def rate_limited_scan(self,
Copy link
Contributor

Choose a reason for hiding this comment

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

which rule is this?

@@ -167,8 +167,8 @@ class MetaModel(AttributeContainerMeta):
This class is just here so that index queries have nice syntax.
Model.index.query()
"""
def __init__(cls, name, bases, attrs):
Copy link
Contributor

Choose a reason for hiding this comment

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

The cls is due to this being a meta class. Is there a PEP-8 rule enforcing this naming?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants