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

Fix "Edit in Github" link #3427

Merged
merged 9 commits into from
Dec 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .flake8
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[flake8]
ignore = E125,D100,D101,D102,D103,D105,D106,D107,D200,D202,D211,P101,FI15,FI16,FI12,FI11,FI17,FI50,FI53,FI54,MQ101,T000
ignore = E125,D100,D101,D102,D103,D105,D106,D107,D200,D202,D211,D403,P101,FI15,FI16,FI12,FI11,FI17,FI50,FI53,FI54,MQ101,T000
Copy link
Member

Choose a reason for hiding this comment

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

I'm not a huge fan of constantly changing these.. any reason this is here?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm adding it here because I also add it to prospector.

flake8 is used in pre-commit command and also in the IDE linter (emcas, vim, atom, pycharm, etc) if you have it configured.

We need a consistency between prospector and flake8.

max-line-length = 80
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ repos:
- id: yapf
exclude: 'migrations|settings|scripts'
additional_dependencies: ['futures']
args: ['--style=.style.yapf', '--parallel']
args: ['--style=.style.yapf', '--parallel', '--in-place']

- repo: [email protected]:FalconSocial/pre-commit-python-sorter.git
sha: b57843b0b874df1d16eb0bef00b868792cb245c2
Expand All @@ -44,7 +44,7 @@ repos:
args: ['--silent-overwrite']

- repo: [email protected]:humitos/mirrors-docformatter.git
sha: v0.8
sha: v0.0.1
hooks:
- id: docformatter
args: ['--in-place', '--wrap-summaries=80', '--wrap-descriptions=80', '--pre-summary-newline', '--no-blank']
Expand Down
1 change: 1 addition & 0 deletions prospector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ pep257:
- D106 # Missing docstring in public nested class

# pydocstyle
- D403 # First word of the first line should be properly capitalized ('Github', not 'GitHub')
Copy link
Member

@ericholscher ericholscher Dec 20, 2017

Choose a reason for hiding this comment

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

GitHub is actually their branding, so I don't understand this comment?

Copy link
Member Author

Choose a reason for hiding this comment

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

This comment is the error message that prospector produces. I'm pasting the comment here to understand why I'm ignoring this particular code.

In this case, D403 doesn't allow a docstring starting with GitHub string probably because it's CamelCase.

- D406 # Section name should end with a newline ('Examples', not 'Examples::')
- D407 # Missing dashed underline after section ('Examples')
- D412 # No blank lines allowed between a section header and its content ('Examples')
Expand Down
1 change: 1 addition & 0 deletions readthedocs/builds/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ def commit_name(self):

# If we came that far it's not a special version nor a branch or tag.
# Therefore just return the identifier to make a safe guess.
log.error('TODO: Raise an exception here. Testing what cases it happens')
return self.identifier

def get_absolute_url(self):
Expand Down
1 change: 1 addition & 0 deletions readthedocs/restapi/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class Meta(object):
'identifier', 'verbose_name',
'active', 'built',
'downloads',
'type',
)


Expand Down
Loading