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

Container: Blacken (via synth). #8285

Merged
merged 1 commit into from Jun 12, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions container/google/cloud/container_v1/__init__.py
Expand Up @@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import absolute_import

from google.cloud.container_v1 import types
Expand Down
Expand Up @@ -13,6 +13,7 @@
# 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.

"""Accesses the google.container.v1 ClusterManager API."""

import pkg_resources
Expand All @@ -33,6 +34,7 @@
from google.cloud.container_v1.proto import cluster_service_pb2_grpc
from google.protobuf import empty_pb2


_GAPIC_LIBRARY_VERSION = pkg_resources.get_distribution(
"google-cloud-container"
).version
Expand Down
1 change: 1 addition & 0 deletions container/google/cloud/container_v1/gapic/enums.py
Expand Up @@ -13,6 +13,7 @@
# 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.

"""Wrappers for protocol buffer enum types."""

import enum
Expand Down
Expand Up @@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


import google.api_core.grpc_helpers

from google.cloud.container_v1.proto import cluster_service_pb2_grpc
Expand Down
5 changes: 4 additions & 1 deletion container/google/cloud/container_v1/types.py
Expand Up @@ -14,6 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.


from __future__ import absolute_import
import sys

Expand All @@ -22,13 +23,14 @@
from google.cloud.container_v1.proto import cluster_service_pb2
from google.protobuf import empty_pb2


_shared_modules = [empty_pb2]

_local_modules = [cluster_service_pb2]

names = []

for module in _shared_modules:
for module in _shared_modules: # pragma: NO COVER
for name, message in get_messages(module).items():
setattr(sys.modules[__name__], name, message)
names.append(name)
Expand All @@ -38,4 +40,5 @@
setattr(sys.modules[__name__], name, message)
names.append(name)


__all__ = tuple(sorted(names))
4 changes: 2 additions & 2 deletions container/noxfile.py
Expand Up @@ -83,7 +83,7 @@ def default(session):
"--cov-append",
"--cov-config=.coveragerc",
"--cov-report=",
"--cov-fail-under=75",
"--cov-fail-under=0",
os.path.join("tests", "unit"),
*session.posargs,
)
Expand Down Expand Up @@ -136,7 +136,7 @@ def cover(session):
test runs (not system test runs), and then erases coverage data.
"""
session.install("coverage", "pytest-cov")
session.run("coverage", "report", "--show-missing", "--fail-under=75")
session.run("coverage", "report", "--show-missing", "--fail-under=70")

session.run("coverage", "erase")

Expand Down
10 changes: 5 additions & 5 deletions container/synth.metadata
@@ -1,19 +1,19 @@
{
"updateTime": "2019-05-10T12:16:09.524983Z",
"updateTime": "2019-06-11T15:58:37.501004Z",
"sources": [
{
"generator": {
"name": "artman",
"version": "0.19.0",
"dockerImage": "googleapis/artman@sha256:d3df563538225ac6caac45d8ad86499500211d1bcb2536955a6dbda15e1b368e"
"version": "0.24.0",
"dockerImage": "googleapis/artman@sha256:ce425884865f57f18307e597bca1a74a3619b7098688d4995261f3ffb3488681"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "07883be5bf3c3233095e99d8e92b8094f5d7084a",
"internalRef": "247530843"
"sha": "744feb9660b3194fcde37dea50038bde204f3573",
"internalRef": "252553801"
}
},
{
Expand Down
2 changes: 1 addition & 1 deletion container/synth.py
Expand Up @@ -56,7 +56,7 @@
# ----------------------------------------------------------------------------
# Add templated files
# ----------------------------------------------------------------------------
templated_files = common.py_library(unit_cov_level=76, cov_level=77)
templated_files = common.py_library(unit_cov_level=0, cov_level=70)
s.move(templated_files)

s.shell.run(["nox", "-s", "blacken"], hide_output=False)
Expand Up @@ -13,6 +13,7 @@
# 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.

"""Unit tests."""

import mock
Expand Down