Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Commit

Permalink
docs: update docstrings (via synth) (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation committed Apr 21, 2020
1 parent acf43c6 commit 327d07a
Show file tree
Hide file tree
Showing 12 changed files with 91 additions and 46 deletions.
16 changes: 16 additions & 0 deletions .coveragerc
@@ -1,3 +1,19 @@
# -*- coding: utf-8 -*-
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Generated by synthtool. DO NOT EDIT!
[run]
branch = True
Expand Down
16 changes: 16 additions & 0 deletions .flake8
@@ -1,3 +1,19 @@
# -*- coding: utf-8 -*-
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Generated by synthtool. DO NOT EDIT!
[flake8]
ignore = E203, E266, E501, W503
Expand Down
3 changes: 1 addition & 2 deletions .github/ISSUE_TEMPLATE/bug_report.md
Expand Up @@ -11,8 +11,7 @@ Thanks for stopping by to let us know something could be better!
Please run down the following list and make sure you've tried the usual "quick fixes":

- Search the issues already opened: https://github.com/googleapis/python-webrisk/issues
- Search the issues on our "catch-all" repository: https://github.com/googleapis/google-cloud-python
- Search StackOverflow: http://stackoverflow.com/questions/tagged/google-cloud-platform+python
- Search StackOverflow: https://stackoverflow.com/questions/tagged/google-cloud-platform+python

If you are still having issues, please be sure to include as much information as possible:

Expand Down
15 changes: 3 additions & 12 deletions CONTRIBUTING.rst
Expand Up @@ -22,7 +22,7 @@ In order to add a feature:
documentation.

- The feature must work fully on the following CPython versions: 2.7,
3.5, 3.6, and 3.7 on both UNIX and Windows.
3.5, 3.6, 3.7 and 3.8 on both UNIX and Windows.

- The feature must not add unnecessary dependencies (where
"unnecessary" is of course subjective, but new dependencies should
Expand Down Expand Up @@ -214,26 +214,18 @@ We support:
- `Python 3.5`_
- `Python 3.6`_
- `Python 3.7`_
- `Python 3.8`_

.. _Python 3.5: https://docs.python.org/3.5/
.. _Python 3.6: https://docs.python.org/3.6/
.. _Python 3.7: https://docs.python.org/3.7/
.. _Python 3.8: https://docs.python.org/3.8/


Supported versions can be found in our ``noxfile.py`` `config`_.

.. _config: https://github.com/googleapis/python-webrisk/blob/master/noxfile.py

We explicitly decided not to support `Python 2.5`_ due to `decreased usage`_
and lack of continuous integration `support`_.

.. _Python 2.5: https://docs.python.org/2.5/
.. _decreased usage: https://caremad.io/2013/10/a-look-at-pypi-downloads/
.. _support: https://blog.travis-ci.com/2013-11-18-upcoming-build-environment-updates/

We have `dropped 2.6`_ as a supported version as well since Python 2.6 is no
longer supported by the core development team.

Python 2.7 support is deprecated. All code changes should maintain Python 2.7 compatibility until January 1, 2020.

We also explicitly decided to support Python 3 beginning with version
Expand All @@ -247,7 +239,6 @@ We also explicitly decided to support Python 3 beginning with version
.. _prominent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django
.. _projects: http://flask.pocoo.org/docs/0.10/python3/
.. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/
.. _dropped 2.6: https://github.com/googleapis/google-cloud-python/issues/995

**********
Versioning
Expand Down
16 changes: 16 additions & 0 deletions MANIFEST.in
@@ -1,3 +1,19 @@
# -*- coding: utf-8 -*-
#
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Generated by synthtool. DO NOT EDIT!
include README.rst LICENSE
recursive-include google *.json *.proto
Expand Down
Expand Up @@ -163,14 +163,9 @@ def search_hashes(self):
def create_submission(self):
"""Return the gRPC stub for :meth:`WebRiskServiceClient.create_submission`.
Creates a Submission of a URI suspected of containing phishing
content to be reviewed. If the result verifies the existence of
malicious phishing content, the site will be added to the `Google's
Social Engineering
lists <https://support.google.com/webmasters/answer/6350487/>`__ in
order to protect users that could get exposed to this threat in the
future. Only projects with CREATE_SUBMISSION_USERS visibility can use
this method.
The maximum size in number of entries. The diff will not contain
more entries than this value. This should be a power of 2 between
2\ **10 and 2**\ 20. If zero, no diff size limit is set.
Returns:
Callable: A callable which accepts the appropriate
Expand Down
17 changes: 7 additions & 10 deletions google/cloud/webrisk_v1/gapic/web_risk_service_client.py
Expand Up @@ -416,14 +416,9 @@ def create_submission(
metadata=None,
):
"""
Creates a Submission of a URI suspected of containing phishing
content to be reviewed. If the result verifies the existence of
malicious phishing content, the site will be added to the `Google's
Social Engineering
lists <https://support.google.com/webmasters/answer/6350487/>`__ in
order to protect users that could get exposed to this threat in the
future. Only projects with CREATE_SUBMISSION_USERS visibility can use
this method.
The maximum size in number of entries. The diff will not contain
more entries than this value. This should be a power of 2 between
2\ **10 and 2**\ 20. If zero, no diff size limit is set.
Example:
>>> from google.cloud import webrisk_v1
Expand All @@ -438,8 +433,10 @@ def create_submission(
>>> response = client.create_submission(parent, submission)
Args:
parent (str): Required. The name of the project that is making the submission.
This string is in the format "projects/{project_number}".
parent (str): The encoded local, lexicographically-sorted list indices, using a
Golomb-Rice encoding. Used for sending compressed removal indices. The
removal indices (uint32) are sorted in ascending order, then delta
encoded and stored as encoded_data.
submission (Union[dict, ~google.cloud.webrisk_v1.types.Submission]): Required. The submission that contains the content of the phishing report.
If a dict is provided, it must be of the same form as the protobuf
Expand Down
4 changes: 2 additions & 2 deletions google/cloud/webrisk_v1/proto/webrisk_pb2.py

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

0 comments on commit 327d07a

Please sign in to comment.