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

Disable no-else-return #17

Closed
wants to merge 1 commit into from
Closed

Conversation

humitos
Copy link
Member

@humitos humitos commented Aug 30, 2018

We want this enabled, but it seems that it's buggy at the moment. We
exclude it for now.

We want this enabled, but it seems that it's buggy at the moment. We
exclude it for now.
humitos added a commit to readthedocs/readthedocs.org that referenced this pull request Aug 30, 2018
@stsewd
Copy link
Member

stsewd commented Aug 30, 2018

But the reported files really have a return else.

@humitos
Copy link
Member Author

humitos commented Aug 30, 2018

Closing as invalid.

I fixed my PR at readthedocs/readthedocs.org@3087f5b by fixing all the places where this check failed.

@humitos humitos closed this Aug 30, 2018
@humitos humitos deleted the humitos/lint/no-else-return branch August 30, 2018 20:34
agjohnson pushed a commit to readthedocs/readthedocs.org that referenced this pull request Sep 5, 2018
* Upgrade all packages using pur

for reqs in `ls requirements`;
do
  pur
  --skip django-tastypie,django,docker,elasticsearch,pyelasticsearch,commonmark,stripe,djangorestframework,mkdocs,django-allauth,django-filter,mercurial
  --requirement requirements/$reqs;
done

* Run lint with Python 3.6

* Downgrade gitpython to 2.1.10

* Linting error fixed

* Upgrade common

Branch: readthedocs/common#17

* Remove old note for testing

* Add note for django-filter

* no-else-return fixed in all the files

Some block needed to be re-idented to fulfill this check.

Basically, if you have a "if something: return another" the "else"
clause is not needed since it will be the common case for the flow to
continue if the condition is not met.

* Only # noqa comment

* Note about gitpython
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.

2 participants