Skip to content

Commit

Permalink
Better yapf setting to fulfill PEP257 D202
Browse files Browse the repository at this point in the history
pep257: D202 / No blank lines allowed after function docstring (found
1)

Disable this yapf feature beacuse of PEP257
  • Loading branch information
humitos committed Nov 28, 2017
1 parent 39c9899 commit c2f16d6
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ repos:
- id: yapf
exclude: 'migrations|settings|scripts'
additional_dependencies: ['futures']
args: ['--style=.style.yapf', '--parallel']

- repo: [email protected]:FalconSocial/pre-commit-python-sorter.git
sha: b57843b0b874df1d16eb0bef00b868792cb245c2
Expand Down
2 changes: 1 addition & 1 deletion .style.yapf
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ ALLOW_MULTILINE_DICTIONARY_KEYS=False
# # <------ this blank line
# def method():
# ...
BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF=True
BLANK_LINE_BEFORE_NESTED_CLASS_OR_DEF=False

# Insert a blank line before a class-level docstring.
BLANK_LINE_BEFORE_CLASS_DOCSTRING=True
Expand Down
1 change: 0 additions & 1 deletion readthedocs/oauth/services/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def token_updater(self, token):
u'expires_at': 1449218652.558185
}
"""

def _updater(data):
token.token = data['access_token']
token.expires_at = datetime.fromtimestamp(data['expires_at'])
Expand Down
1 change: 0 additions & 1 deletion readthedocs/oauth/services/gitlab.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ def create_repository(
:type organization: RemoteOrganization
:rtype: RemoteRepository
"""

def is_owned_by(owner_id):
return self.account.extra_data['id'] == owner_id

Expand Down

0 comments on commit c2f16d6

Please sign in to comment.