Skip to content

Commit

Permalink
removed future and used items() instead of iteritems()
Browse files Browse the repository at this point in the history
  • Loading branch information
jogilder committed May 12, 2022
1 parent 34a74f7 commit 4a4c900
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
10 changes: 2 additions & 8 deletions cla_common/call_centre_availability/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
pass
# from itertools import ifilter, islice, takewhile
from itertools import islice, takewhile

# want to use this library in python2 and python3
# as items() (replacement in python3) is slow in python 2, need to use future version iteritems
from future.utils import iteritems

import pytz
import requests

Expand Down Expand Up @@ -272,9 +267,8 @@ def __init__(
):
self.day_hours = []
# want to use this library in python2 and python3
# as items() (replacement for iteritems() in python3) is slow in python 2, need to use future version iteritems
# for date_string, hours in kwargs.iteritems():
for date_string, hours in iteritems(kwargs):
# need to use items() (replacement for iteritems() in python3) but is slow in python 2
for date_string, hours in kwargs.items():
self.add_rule(make_date_matcher(date_string), hours)

self.add_rule(on_bank_holiday, bank_holiday)
Expand Down
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ django==1.7.9
wheel==0.22.0
speaklater==1.3
# Additional requirements go here
future==0.18.2
-e .

0 comments on commit 4a4c900

Please sign in to comment.