🌐 AI搜索 & 代理 主页
Skip to content

Conversation

@anglarett
Copy link
Contributor

@anglarett anglarett requested review from a team and wangela November 15, 2022 11:50
*.egg
.vscode/
.idea/
index.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this need to be added to gitignore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need this for local development.

Note: I will submit a new pull request as single commit for all changes to this review round

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine if you need it for local development, but does it have to be added to the .gitignore file that everyone pulls down with the repo?

@anglarett anglarett closed this Nov 15, 2022
@anglarett anglarett force-pushed the address-validation-api branch from 0a3f002 to 6d7a993 Compare November 15, 2022 20:22
@amuramoto amuramoto reopened this Nov 16, 2022
@amuramoto amuramoto requested review from amuramoto and removed request for wangela November 21, 2022 23:08
appropriate amount of time before it runs the current query.
:type queries_per_second: int
:param queries_per_minute: Number of queries per minute permitted. Unset queries_per_second to None. If set smaller number will be used.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is support for queries per minute being added? It adds extra complexity to validate on ln 184, and seems extraneous. IMO setting quota per second is more standard. If there isn't a reason why this must be added, please remove.


class AddressValidationTest(TestCase):
def setUp(self):
self.key = "AIzaSyD_sJl0qMA65CYHMBokVfMNA7AKyt5ERYs"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this leaking an API key?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anglarett PTAL

self.assertURLEqual(
"https://addressvalidation.googleapis.com/v1:validateAddress?" "key=%s" % self.key,
responses.calls[0].request.url,
) No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add newline to EOF for linter

print(queries_quota)

except NameError:
print("MISSING VALUE for queries_per_second or queries_per_minute") No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add newline to EOF for linter

@@ -0,0 +1,48 @@
# This Python file uses the following encoding: utf-8
#
# Copyright 2017 Google Inc. All rights reserved.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update license header to 2022

@@ -0,0 +1,19 @@
import math
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain what this is for? I don't see it used anywhere in the project, and it appears to duplicate the rate limiting logic you added in client.py

*.egg
.vscode/
.idea/
index.py
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine if you need it for local development, but does it have to be added to the .gitignore file that everyone pulls down with the repo?

@amuramoto amuramoto merged commit 5b952d7 into googlemaps:master Nov 21, 2022
googlemaps-bot pushed a commit that referenced this pull request Nov 21, 2022
## [4.7.2](v4.7.1...v4.7.2) (2022-11-21)

### Bug Fixes

* fixes broken support for python 3.5  ([#453](#453)) ([5b952d7](5b952d7))
@googlemaps-bot
Copy link
Contributor

🎉 This PR is included in version 4.7.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants