Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
StegSchreck committed Apr 30, 2017
1 parent 497c63a commit 9722ed2
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .idea/runConfigurations/OFM_functional_tests.xml

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

1 change: 1 addition & 0 deletions .idea/runConfigurations/OFM_unit_tests.xml

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

1 change: 1 addition & 0 deletions .idea/runConfigurations/Runserver_Plus.xml

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

1 change: 1 addition & 0 deletions .idea/runConfigurations/Shell_Plus.xml

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

2 changes: 1 addition & 1 deletion .pylintrc
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ enable=all
# --disable=W"
#disable=all
#disable=map-builtin-not-iterating,reduce-builtin,parameter-unpacking,buffer-builtin,raw_input-builtin,execfile-builtin,raising-string,cmp-method,old-octal-literal,suppressed-message,print-statement,import-star-module-level,indexing-exception,long-builtin,apply-builtin,dict-view-method,old-division,unicode-builtin,setslice-method,unichr-builtin,round-builtin,oct-method,next-method-called,unpacking-in-except,metaclass-assignment,using-cmp-argument,old-raise-syntax,cmp-builtin,file-builtin,old-ne-operator,basestring-builtin,xrange-builtin,useless-suppression,nonzero-method,standarderror-builtin,range-builtin-not-iterating,delslice-method,no-absolute-import,coerce-method,input-builtin,backtick,long-suffix,intern-builtin,coerce-builtin,zip-builtin-not-iterating,filter-builtin-not-iterating,reload-builtin,getslice-method,hex-method,dict-iter-method
disable=missing-docstring,unused-import,wildcard-import,unused-wildcard-import,no-method,too-few-public-methods,invalid-name,no-member,bad-continuation,unused-argument,redefined-variable-type,too-many-ancestors
disable=missing-docstring,unused-import,wildcard-import,unused-wildcard-import,no-method,too-few-public-methods,invalid-name,no-member,bad-continuation,unused-argument,redefined-variable-type,too-many-ancestors,no-else-return

[REPORTS]

Expand Down
2 changes: 1 addition & 1 deletion core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def get_current():
matchday = finances[0].matchday
if player_statistics.count() > 0 and player_statistics[0].matchday.number > matchday.number:
matchday = player_statistics[0].matchday
if len(matches) > 0 and matches[0].matchday.number > matchday.number:
if matches and matches[0].matchday.number > matchday.number:
matchday = matches[0].matchday

return matchday
Expand Down
2 changes: 1 addition & 1 deletion core/parsers/match_details_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def parse_html(self, soup): # pylint: disable=too-many-locals
match.guest_team_statistics.yellow_cards = guest_team_yellow_cards
match.guest_team_statistics.red_cards = guest_team_red_cards
match.guest_team_statistics.save()
elif len(existing_match) == 0:
elif not existing_match:
home_team_stat = MatchTeamStatistics.objects.create(
score=home_team_score,
team_name=home_team_name,
Expand Down
2 changes: 1 addition & 1 deletion core/views/ofm/player_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def get_context_data(self, **kwargs):

return context

def get_object(self, **kwargs):
def get_object(self, **kwargs): # pylint: disable=arguments-differ
player = super(PlayerDetailView, self).get_object()
contracts = Contract.objects.filter(user=self.request.user, player=player, sold_on_matchday=None)
return player if contracts.count() > 0 else None
Expand Down
2 changes: 1 addition & 1 deletion core/views/ofm/stadium_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ def get_context_data(self, **kwargs):

return context

def get_object(self, **kwargs):
def get_object(self, **kwargs): # pylint: disable=arguments-differ
stadium_stat = super(StadiumDetailView, self).get_object()
matches = Match.objects.filter(user=self.request.user, stadium_statistics=stadium_stat)
return stadium_stat if matches.count() > 0 else None
Expand Down

0 comments on commit 9722ed2

Please sign in to comment.