Skip to content

Commit

Permalink
Flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
rnegron committed Dec 26, 2019
1 parent 678fae0 commit 269a3a3
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 4 deletions.
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ boto3 = "==1.10.45"
pre-commit = "*"
black = "*"
isort = "*"
flake8 = "*"

[requires]
python_version = "3.7"
Expand Down
38 changes: 37 additions & 1 deletion Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions notaso/restapi/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ def list(self, request):
if request.GET.get("university_id"):
university_id = request.GET.get("university_id")
for i, query in enumerate(self.queryset):
if query.count(university_id) is not 0:
if query.count(university_id) != 0:
query.extra_info = {
"university_id": university_id,
"professors_count": query.count(university_id),
Expand Down Expand Up @@ -206,7 +206,7 @@ def retrieve(self, request, pk=None):
department = get_object_or_404(queryset, pk=pk)
if request.GET.get("university_id"):
university_id = request.GET.get("university_id")
if department.count(university_id) is not 0:
if department.count(university_id) != 0:
department.extra_info = {
"university": university_id,
"professors_count": department.count(university_id),
Expand Down
1 change: 0 additions & 1 deletion notaso/utils/apps.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _


class UtilsConfig(AppConfig):
Expand Down

0 comments on commit 269a3a3

Please sign in to comment.