Skip to content

Commit

Permalink
removed output.json,
Browse files Browse the repository at this point in the history
fixed ordering of the filters to be predictable on python2/3,
  • Loading branch information
PythonicNinja committed Nov 17, 2017
1 parent f36a12d commit 8fe2763
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,5 @@ ENV/

# mypy
.mypy_cache/

output.json
4 changes: 2 additions & 2 deletions morizon/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ def get_url(self):
url += '/' + encode_text_to_url(self.street)
url += '/?page={0}&'.format(self.page)
if self.filters and len(self.filters) > 0:
for i, param in enumerate(self.filters):
url += "ps{0}={1}&".format(quote(param), self.filters[param])
for param, value in sorted(self.filters.items(), key=lambda item: item[0]):
url += "ps{0}={1}&".format(quote(param), value)
return url

@classmethod
Expand Down
2 changes: 0 additions & 2 deletions test_data/output.json

This file was deleted.

0 comments on commit 8fe2763

Please sign in to comment.