-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add black. #94
Add black. #94
Conversation
@busunkim96 We likely need to apply |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest dropping all the synthtool
parts and just add the minimal stanzas to noxfile.py
to get black
running.
.coveragerc
Outdated
omit = | ||
*/gapic/*.py | ||
*/proto/*.py | ||
*/core/*.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None of these three is appropriate for this library.
.coveragerc
Outdated
*/gapic/*.py | ||
*/proto/*.py | ||
*/core/*.py | ||
*/site-packages/*.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should exclude .nox/
instead?
.flake8
Outdated
# Exclude generated code. | ||
**/proto/** | ||
**/gapic/** | ||
*_pb2.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have no generated code.
MANIFEST.in
Outdated
@@ -1,4 +1,5 @@ | |||
include README.rst LICENSE | |||
recursive-include google | |||
recursive-include google *.json *.proto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have no .json
or .proto
files.
noxfile.py
Outdated
# | ||
# 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! | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment is incorrect: we have no synth.
noxfile.py
Outdated
|
||
import nox | ||
|
||
|
||
SYSTEM_TEST_ENV_VARS = ( | ||
'GOOGLE_APPLICATION_CREDENTIALS', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this variable to allow skipping systests when not set.
noxfile.py
Outdated
SYSTEM_TEST_ENV_VARS = ( | ||
'GOOGLE_APPLICATION_CREDENTIALS', | ||
) | ||
GOOGLE_AUTH = 'google-auth >= 0.10.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variable is part of setting up required dependencies.
noxfile.py
Outdated
@nox.session(python=['2.7', '3.4', '3.5', '3.6', '3.7']) | ||
def unit_tests(session): | ||
"""Run the unit test suite.""" | ||
LOCAL_DEPS = (os.path.join("..", "api_core"), os.path.join("..", "core")) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no ../api_core
or ../core
in this library.
noxfile.py
Outdated
msg = 'Environment variable(s) unset: {}'.format(all_vars) | ||
session.skip(msg) | ||
# Use pre-release gRPC for system tests. | ||
session.install("--pre", "grpcio") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
Skipping the systests when the environment variable is not set should remain.
-
We have no
grpc
in this library.
synth.py
Outdated
templated_files = common.py_library() | ||
s.move(templated_files) | ||
|
||
s.shell.run(["nox", "-s", "blacken"], hide_output=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need synth here at all: the templates make too many assumptions which are incorrect for this library.
@tseaver I backed out most of the templates. This PR does the following:
|
1986: Update dependency webpack-cli to v3.3.9 r=rehandalal a=renovate[bot] This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [webpack-cli](https://togithub.com/webpack/webpack-cli) | devDependencies | patch | [`3.3.8` -> `3.3.9`](https://renovatebot.com/diffs/npm/webpack-cli/3.3.8/3.3.9) | 1987: Update dependency babel-plugin-import to v1.12.2 r=rehandalal a=renovate[bot] This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [babel-plugin-import](https://togithub.com/ant-design/babel-plugin-import) | devDependencies | patch | [`1.12.1` -> `1.12.2`](https://renovatebot.com/diffs/npm/babel-plugin-import/1.12.1/1.12.2) | 1988: Scheduled weekly dependency update for week 38 r=rehandalal a=pyup-bot ### Update [botocore](https://pypi.org/project/botocore) from **1.12.228** to **1.12.233**. <details> <summary>Changelog</summary> ### 1.12.233 ``` ======== * api-change:``workspaces``: Update workspaces client to latest version * api-change:``ec2``: Update ec2 client to latest version * api-change:``greengrass``: Update greengrass client to latest version * api-change:``rds``: Update rds client to latest version ``` ### 1.12.232 ``` ======== * api-change:``mediaconnect``: Update mediaconnect client to latest version * api-change:``glue``: Update glue client to latest version * api-change:``ecs``: Update ecs client to latest version ``` ### 1.12.231 ``` ======== * api-change:``ram``: Update ram client to latest version * api-change:``waf-regional``: Update waf-regional client to latest version * api-change:``apigateway``: Update apigateway client to latest version ``` ### 1.12.230 ``` ======== * api-change:``iam``: Update iam client to latest version * api-change:``athena``: Update athena client to latest version * api-change:``personalize``: Update personalize client to latest version ``` ### 1.12.229 ``` ======== * api-change:``eks``: Update eks client to latest version * api-change:``mediaconvert``: Update mediaconvert client to latest version ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/botocore - Changelog: https://pyup.io/changelogs/botocore/ - Repo: https://github.com/boto/botocore </details> ### Update [Faker](https://pypi.org/project/Faker) from **2.0.1** to **2.0.2**. <details> <summary>Changelog</summary> ### 2.0.2 ``` --------------------------------------------------------------------------------------- * Fix typos, misspellings. Add locations, names, dates in ``hi_IN`` providers. Thanks kathawala. * Bump required version ``text-unidecode`` to 1.3. Thanks moggers87. * Bug fix for ``pyfloat`` going over ``max_value``. Thanks fgs-dbudwin. ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/faker - Changelog: https://pyup.io/changelogs/faker/ - Repo: https://github.com/joke2k/faker </details> ### Update [google-resumable-media](https://pypi.org/project/google-resumable-media) from **0.4.0** to **0.4.1**. <details> <summary>Changelog</summary> ### 0.4.1 ``` 09-16-2019 17:59 PDT Implementation Changes - Revert "Always use raw response data. ([87](googleapis/google-resumable-media-python#87; ([103](googleapis/google-resumable-media-python#103)) Internal / Testing Changes - Add black. ([94](googleapis/google-resumable-media-python#94)) ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/google-resumable-media - Changelog: https://pyup.io/changelogs/google-resumable-media/ - Repo: https://github.com/GoogleCloudPlatform/google-resumable-media-python </details> ### Update [packaging](https://pypi.org/project/packaging) from **19.1** to **19.2**. *The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)* <details> <summary>Links</summary> - PyPI: https://pypi.org/project/packaging - Changelog: https://pyup.io/changelogs/packaging/ - Repo: https://github.com/pypa/packaging </details> ### Update [boto3](https://pypi.org/project/boto3) from **1.9.228** to **1.9.233**. <details> <summary>Changelog</summary> ### 1.9.233 ``` ======= * api-change:``workspaces``: [``botocore``] Update workspaces client to latest version * api-change:``ec2``: [``botocore``] Update ec2 client to latest version * api-change:``greengrass``: [``botocore``] Update greengrass client to latest version * api-change:``rds``: [``botocore``] Update rds client to latest version ``` ### 1.9.232 ``` ======= * api-change:``mediaconnect``: [``botocore``] Update mediaconnect client to latest version * api-change:``glue``: [``botocore``] Update glue client to latest version * api-change:``ecs``: [``botocore``] Update ecs client to latest version ``` ### 1.9.231 ``` ======= * api-change:``ram``: [``botocore``] Update ram client to latest version * api-change:``waf-regional``: [``botocore``] Update waf-regional client to latest version * api-change:``apigateway``: [``botocore``] Update apigateway client to latest version ``` ### 1.9.230 ``` ======= * api-change:``iam``: [``botocore``] Update iam client to latest version * api-change:``athena``: [``botocore``] Update athena client to latest version * api-change:``personalize``: [``botocore``] Update personalize client to latest version ``` ### 1.9.229 ``` ======= * api-change:``eks``: [``botocore``] Update eks client to latest version * api-change:``mediaconvert``: [``botocore``] Update mediaconvert client to latest version ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/boto3 - Changelog: https://pyup.io/changelogs/boto3/ - Repo: https://github.com/boto/boto3 </details> ### Update [google-cloud-storage](https://pypi.org/project/google-cloud-storage) from **1.19.0** to **1.19.1**. *The bot wasn't able to find a changelog for this release. [Got an idea?](https://github.com/pyupio/changelogs/issues/new)* <details> <summary>Links</summary> - PyPI: https://pypi.org/project/google-cloud-storage - Repo: https://github.com/GoogleCloudPlatform/google-cloud-python </details> ### Update [graphene-django](https://pypi.org/project/graphene-django) from **2.5.0** to **2.6.0**. <details> <summary>Changelog</summary> ### 2.6.0 ``` Changelog Another release before v3. Fingers crossed we'll get v3 out soon! New features * Extend DjangoListField to use model queryset if none defined (732) * Convert DRF ChoiceField to Enum (537) * Adds variables arg to GraphQLTestCase.query (699) Bugfixes * Handle isnull filters differently (753) * Pin higher version of graphene for proper graphql-core version r… (768) Full changelog: graphql-python/graphene-django@v2.5.0...v2.6.0 ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/graphene-django - Changelog: https://pyup.io/changelogs/graphene-django/ - Repo: https://github.com/graphql-python/graphene-django </details> ### Update [kinto-http](https://pypi.org/project/kinto-http) from **10.5.0** to **10.6.0**. <details> <summary>Changelog</summary> ### 10.6.0 ``` =================== **New features** - Specify requests timeout in client constructor ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/kinto-http - Changelog: https://pyup.io/changelogs/kinto-http/ - Repo: https://github.com/Kinto/kinto-http.py/ </details> ### Update [markus[datadog]](https://pypi.org/project/markus) from **1.2.0** to **2.0.0**. <details> <summary>Changelog</summary> ### 2.0.0 ``` ---------------------------- **Features** * Use ``time.perf_counter()`` if available. Thank you, Mike! (34) * Support Python 3.7 officially. * Add filters for adjusting and dropping metrics getting emitted. See documentation for more details. (40) **Backwards incompatible changes** * ``tags`` now defaults to ``[]`` instead of ``None`` which may affect some expected test output. * Adjust internals to run ``.emit()`` on backends. If you wrote your own backend, you may need to adjust it. * Drop support for Python 3.4. (39) * Drop support for Python 2.7. If you're still using Python 2.7, you'll need to pin to ``<2.0.0``. (42) **Bug fixes** * Document feature support in backends. (47) * Fix ``MetricsMock.has_record()`` example. (Thanks John!) ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/markus - Changelog: https://pyup.io/changelogs/markus/ - Repo: https://github.com/willkg/markus </details> ### Update [pytest](https://pypi.org/project/pytest) from **5.1.2** to **5.1.3**. <details> <summary>Changelog</summary> ### 5.1.3 ``` ========================= Bug Fixes --------- - `5807 <https://github.com/pytest-dev/pytest/issues/5807>`_: Fix pypy3.6 (nightly) on windows. - `5811 <https://github.com/pytest-dev/pytest/issues/5811>`_: Handle ``--fulltrace`` correctly with ``pytest.raises``. - `5819 <https://github.com/pytest-dev/pytest/issues/5819>`_: Windows: Fix regression with conftest whose qualified name contains uppercase characters (introduced by 5792). ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/pytest - Changelog: https://pyup.io/changelogs/pytest/ - Homepage: https://docs.pytest.org/en/latest/ </details> ### Update [Werkzeug](https://pypi.org/project/Werkzeug) from **0.15.6** to **0.16.0**. <details> <summary>Changelog</summary> ### 0.16.0 ``` -------------- Unreleased - Deprecate most top-level attributes provided by the ``werkzeug`` module in favor of direct imports. The deprecated imports will be removed in version 1.0. For example, instead of ``import werkzeug; werkzeug.url_quote``, do ``from werkzeug.urls import url_quote``. A deprecation warning will show the correct import to use. ``werkzeug.exceptions`` and ``werkzeug.routing`` should also be imported instead of accessed, but for technical reasons can't show a warning. :issue:`2`, :pr:`1640` ``` </details> <details> <summary>Links</summary> - PyPI: https://pypi.org/project/werkzeug - Changelog: https://pyup.io/changelogs/werkzeug/ - Homepage: https://palletsprojects.com/p/werkzeug/ </details> Co-authored-by: Renovate Bot <[email protected]> Co-authored-by: pyup-bot <[email protected]>
Adds a nox session
black
. Also adds a synth script to copy templates for kokoro jobs.