Skip to content
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

Merged
merged 2 commits into from
Sep 16, 2019
Merged

Add black. #94

merged 2 commits into from
Sep 16, 2019

Conversation

busunkim96
Copy link
Contributor

@busunkim96 busunkim96 commented Aug 27, 2019

Adds a nox session black. Also adds a synth script to copy templates for kokoro jobs.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Aug 27, 2019
setup.cfg Outdated Show resolved Hide resolved
@tseaver
Copy link
Contributor

tseaver commented Aug 28, 2019

@busunkim96 We likely need to apply black after "quiescing" the repository (merging / closing open PRs).

Copy link
Contributor

@tseaver tseaver left a 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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

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!

Copy link
Contributor

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',
Copy link
Contributor

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'
Copy link
Contributor

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"))
Copy link
Contributor

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")
Copy link
Contributor

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)
Copy link
Contributor

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.

@busunkim96
Copy link
Contributor Author

@tseaver I backed out most of the templates. This PR does the following:

  • add .kokoro templates
  • add nox session blacken
  • run black in lint session

@tseaver tseaver merged commit 073360d into master Sep 16, 2019
@tseaver tseaver deleted the blacken branch September 16, 2019 20:32
bors bot added a commit to mozilla/normandy that referenced this pull request Sep 24, 2019
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://github.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://github.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 &quot;Always use raw response data. ([87](https://github.com/googleapis/google-resumable-media-python/pull/87))&quot; ([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&#39;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&#39;re still using Python 2.7, you&#39;ll need to pin to ``&lt;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 &lt;https://github.com/pytest-dev/pytest/issues/5807&gt;`_: Fix pypy3.6 (nightly) on windows.


- `5811 &lt;https://github.com/pytest-dev/pytest/issues/5811&gt;`_: Handle ``--fulltrace`` correctly with ``pytest.raises``.


- `5819 &lt;https://github.com/pytest-dev/pytest/issues/5819&gt;`_: 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&#39;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 <bot@renovateapp.com>
Co-authored-by: pyup-bot <github-bot@pyup.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants