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

chore: [autoapprove] Update black and isort to latest versions #873

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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:fac304457974bb530cc5396abd4ab25d26a469cd3bc97cbfb18c8d4324c584eb
# created: 2023-10-02T21:31:03.517640371Z
digest: sha256:08e34975760f002746b1d8c86fdc90660be45945ee6d9db914d1508acdf9a547
# created: 2023-10-09T14:06:13.397766266Z
6 changes: 3 additions & 3 deletions .kokoro/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,9 @@ typing-extensions==4.4.0 \
--hash=sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa \
--hash=sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e
# via -r requirements.in
urllib3==1.26.12 \
--hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \
--hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997
urllib3==1.26.17 \
--hash=sha256:24d6a242c28d29af46c3fae832c36db3bbebcc533dd1bb549172cd739c82df21 \
--hash=sha256:94a757d178c9be92ef5539b8840d48dc9cf1b2709c9d6b588232a055c524458b
# via
# requests
# twine
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ repos:
- id: end-of-file-fixer
- id: check-yaml
- repo: https://github.com/psf/black
rev: 22.3.0
rev: 23.7.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
Expand Down
1 change: 0 additions & 1 deletion docs/snippets.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,6 @@ def test_bigtable_create_table():


def test_bigtable_list_tables():

# [START bigtable_api_list_tables]
from google.cloud.bigtable import Client

Expand Down
1 change: 0 additions & 1 deletion docs/snippets_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,6 @@ def test_bigtable_create_family_gc_nested():


def test_bigtable_row_data_cells_cell_value_cell_values():

value = b"value_in_col1"
row = Config.TABLE.row(b"row_key_1")
row.set_cell(
Expand Down
36 changes: 19 additions & 17 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,46 +17,48 @@
# Generated by synthtool. DO NOT EDIT!

from __future__ import absolute_import

import os
import pathlib
import re
import shutil
from typing import Dict, List
import warnings

import nox

FLAKE8_VERSION = "flake8==6.1.0"
BLACK_VERSION = "black==22.3.0"
ISORT_VERSION = "isort==5.10.1"
BLACK_VERSION = "black[jupyter]==23.7.0"
ISORT_VERSION = "isort==5.11.0"
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

DEFAULT_PYTHON_VERSION = "3.8"

UNIT_TEST_PYTHON_VERSIONS = ["3.7", "3.8", "3.9", "3.10", "3.11"]
UNIT_TEST_PYTHON_VERSIONS: List[str] = ["3.7", "3.8", "3.9", "3.10", "3.11"]
UNIT_TEST_STANDARD_DEPENDENCIES = [
"mock",
"asyncmock",
"pytest",
"pytest-cov",
"pytest-asyncio",
]
UNIT_TEST_EXTERNAL_DEPENDENCIES = []
UNIT_TEST_LOCAL_DEPENDENCIES = []
UNIT_TEST_DEPENDENCIES = []
UNIT_TEST_EXTRAS = []
UNIT_TEST_EXTRAS_BY_PYTHON = {}

SYSTEM_TEST_PYTHON_VERSIONS = ["3.8"]
SYSTEM_TEST_STANDARD_DEPENDENCIES = [
UNIT_TEST_EXTERNAL_DEPENDENCIES: List[str] = []
UNIT_TEST_LOCAL_DEPENDENCIES: List[str] = []
UNIT_TEST_DEPENDENCIES: List[str] = []
UNIT_TEST_EXTRAS: List[str] = []
UNIT_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}

SYSTEM_TEST_PYTHON_VERSIONS: List[str] = ["3.8"]
SYSTEM_TEST_STANDARD_DEPENDENCIES: List[str] = [
"mock",
"pytest",
"google-cloud-testutils",
]
SYSTEM_TEST_EXTERNAL_DEPENDENCIES = []
SYSTEM_TEST_LOCAL_DEPENDENCIES = []
SYSTEM_TEST_DEPENDENCIES = []
SYSTEM_TEST_EXTRAS = []
SYSTEM_TEST_EXTRAS_BY_PYTHON = {}
SYSTEM_TEST_EXTERNAL_DEPENDENCIES: List[str] = []
SYSTEM_TEST_LOCAL_DEPENDENCIES: List[str] = []
SYSTEM_TEST_DEPENDENCIES: List[str] = []
SYSTEM_TEST_EXTRAS: List[str] = []
SYSTEM_TEST_EXTRAS_BY_PYTHON: Dict[str, List[str]] = {}

CURRENT_DIRECTORY = pathlib.Path(__file__).parent.absolute()

Expand All @@ -71,6 +73,7 @@
"lint_setup_py",
"blacken",
"docs",
"format",
]

# Error if a python version is missing
Expand Down Expand Up @@ -201,7 +204,6 @@ def unit(session):


def install_systemtest_dependencies(session, *constraints):

# Use pre-release gRPC for system tests.
# Exclude version 1.52.0rc1 which has a known issue.
# See https://github.com/grpc/grpc/issues/32163
Expand Down
1 change: 0 additions & 1 deletion tests/system/test_instance_admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ def _create_app_profile_helper(
allow_transactional_writes=None,
ignore_warnings=None,
):

app_profile = instance.app_profile(
app_profile_id=app_profile_id,
routing_policy_type=routing_policy_type,
Expand Down
6 changes: 0 additions & 6 deletions tests/unit/test_batcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ def callback_fn(response):
def test_mutation_batcher_mutate_row():
table = _Table(TABLE_NAME)
with MutationsBatcher(table=table) as mutation_batcher:

rows = [
DirectRow(row_key=b"row_key"),
DirectRow(row_key=b"row_key_2"),
Expand All @@ -75,7 +74,6 @@ def test_mutation_batcher_mutate_row():
def test_mutation_batcher_mutate():
table = _Table(TABLE_NAME)
with MutationsBatcher(table=table) as mutation_batcher:

row = DirectRow(row_key=b"row_key")
row.set_cell("cf1", b"c1", 1)
row.set_cell("cf1", b"c2", 2)
Expand All @@ -98,7 +96,6 @@ def test_mutation_batcher_flush_w_no_rows():
def test_mutation_batcher_mutate_w_max_flush_count():
table = _Table(TABLE_NAME)
with MutationsBatcher(table=table, flush_count=3) as mutation_batcher:

row_1 = DirectRow(row_key=b"row_key_1")
row_2 = DirectRow(row_key=b"row_key_2")
row_3 = DirectRow(row_key=b"row_key_3")
Expand All @@ -114,7 +111,6 @@ def test_mutation_batcher_mutate_w_max_flush_count():
def test_mutation_batcher_mutate_w_max_mutations():
table = _Table(TABLE_NAME)
with MutationsBatcher(table=table) as mutation_batcher:

row = DirectRow(row_key=b"row_key")
row.set_cell("cf1", b"c1", 1)
row.set_cell("cf1", b"c2", 2)
Expand All @@ -130,7 +126,6 @@ def test_mutation_batcher_mutate_w_max_row_bytes():
with MutationsBatcher(
table=table, max_row_bytes=3 * 1024 * 1024
) as mutation_batcher:

number_of_bytes = 1 * 1024 * 1024
max_value = b"1" * number_of_bytes

Expand Down Expand Up @@ -168,7 +163,6 @@ def test_mutations_batcher_context_manager_flushed_when_closed():
with MutationsBatcher(
table=table, max_row_bytes=3 * 1024 * 1024
) as mutation_batcher:

number_of_bytes = 1 * 1024 * 1024
max_value = b"1" * number_of_bytes

Expand Down
4 changes: 0 additions & 4 deletions tests/unit/test_cluster.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,6 @@ def test_cluster_update_w_partial_autoscaling_config():
},
]
for config in cluster_config:

cluster = _make_cluster(
CLUSTER_ID,
instance,
Expand Down Expand Up @@ -927,7 +926,6 @@ def test_cluster_disable_autoscaling():


def test_create_cluster_with_both_manual_and_autoscaling():

from google.cloud.bigtable.instance import Instance
from google.cloud.bigtable.enums import StorageType

Expand Down Expand Up @@ -955,7 +953,6 @@ def test_create_cluster_with_both_manual_and_autoscaling():


def test_create_cluster_with_partial_autoscaling_config():

from google.cloud.bigtable.instance import Instance
from google.cloud.bigtable.enums import StorageType

Expand Down Expand Up @@ -996,7 +993,6 @@ def test_create_cluster_with_partial_autoscaling_config():


def test_create_cluster_with_no_scaling_config():

from google.cloud.bigtable.instance import Instance
from google.cloud.bigtable.enums import StorageType

Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_column_family.py
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,6 @@ def test__gc_rule_from_pb_unknown_field_name():
from google.cloud.bigtable.column_family import _gc_rule_from_pb

class MockProto(object):

names = []

_pb = {}
Expand Down
1 change: 0 additions & 1 deletion tests/unit/test_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ def _make_instance(*args, **kwargs):


def test_instance_constructor_defaults():

client = object()
instance = _make_instance(INSTANCE_ID, client)
assert instance.instance_id == INSTANCE_ID
Expand Down
2 changes: 0 additions & 2 deletions tests/unit/test_row_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -1118,7 +1118,6 @@ def test_RRRM_build_updated_request_row_ranges_valid():


class _MockCancellableIterator(object):

cancel_calls = 0

def __init__(self, *values):
Expand Down Expand Up @@ -1199,5 +1198,4 @@ def _read_rows_retry_exception(exc):


class _Client(object):

data_stub = None
1 change: 0 additions & 1 deletion tests/unit/test_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -1689,7 +1689,6 @@ def _do_mutate_retryable_rows_helper(

expected_entries = []
for row, prior_status in zip(rows, worker.responses_statuses):

if prior_status is None or prior_status.code in RETRYABLES:
mutations = row._get_mutations().copy() # row clears on success
entry = data_messages_v2_pb2.MutateRowsRequest.Entry(
Expand Down
Loading