Skip to content

Commit

Permalink
Merge pull request Yelp#2 from misc/make-pre-commit-happy
Browse files Browse the repository at this point in the history
Make precommit happy
  • Loading branch information
rockdog authored and GitHub Enterprise committed Jan 13, 2021
2 parents 8875339 + b69cb80 commit 18350d4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
6 changes: 3 additions & 3 deletions logic/love.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def recent_received_love(employee_key, start_dt=None, end_dt=None, include_secre
return query.fetch_async(limit) if type(limit) is int else query.fetch_async()


def send_love_email(l):
def send_love_email(l): # noqa
"""Send an email notifying the recipient of l about their love."""
sender_future = l.sender_key.get_async()
recipient_future = l.recipient_key.get_async()
Expand Down Expand Up @@ -132,7 +132,7 @@ def send_loves(recipients, message, sender_username=None, secret=False):
sender_username = logic.alias.name_for_alias(sender_username)
sender_key = Employee.query(
Employee.username == sender_username,
Employee.terminated == False,
Employee.terminated == False, # noqa
).get(keys_only=True) # noqa

if sender_key is None:
Expand Down Expand Up @@ -164,7 +164,7 @@ def validate_love_recipients(recipients):
for recipient_username in unique_recipients:
recipient_key = Employee.query(
Employee.username == recipient_username,
Employee.terminated == False
Employee.terminated == False # noqa
).get(keys_only=True) # noqa

if recipient_key is None:
Expand Down
4 changes: 2 additions & 2 deletions logic/love_count.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def rebuild_love_count():
count = 0
while True:
loves, cursor, has_more = Love.query(Love.timestamp >= week_start).fetch_page(500, start_cursor=cursor)
for l in loves:
LoveCount.update(l, employee_dict=employee_dict)
for love in loves:
LoveCount.update(love, employee_dict=employee_dict)
count += len(loves)
logging.info('Processed {} loves, {}MB'.format(count, memory_usage().current()))
if not has_more:
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ ipdb
mock==2.0.0
NoseGAE==0.5.10
pre-commit==0.13.3
pyrsistent==0.16.1
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@

[tox]
envlist = py27
indexserver =
default = https://pypi.org/simple

[testenv]
deps = -rrequirements-dev.txt
Expand Down

0 comments on commit 18350d4

Please sign in to comment.