8000 chore(python): use black==22.3.0 by gcf-owl-bot[bot] · Pull Request #79 · googleapis/python-appengine-logging · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

chore(python): use black==22.3.0 #79

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
2 changes: 1 addition & 1 deletion .github/.OwlBot.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# limitations under the License.
docker:
image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest
digest: sha256:2d13c2172a5d6129c861edaa48b60ead15aeaf58aa75e02d870c4cbdfa63aaba
digest: sha256:7cffbc10910c3ab1b852c05114a08d374c195a81cdec1d4a67a1d129331d0bfe
5 changes: 4 additions & 1 deletion docs/conf.py
10000
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,10 @@
intersphinx_mapping = {
"python": ("https://python.readthedocs.org/en/latest/", None),
"google-auth": ("https://googleapis.dev/python/google-auth/latest/", None),
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
"google.api_core": (
"https://googleapis.dev/python/google-api-core/latest/",
None,
),
"grpc": ("https://grpc.github.io/grpc/python/", None),
"proto-plus": ("https://proto-plus-python.readthedocs.io/en/latest/", None),
"protobuf": ("https://googleapis.dev/python/protobuf/latest/", None),
Expand Down
224 changes: 181 additions & 43 deletions google/cloud/appengine_logging_v1/types/request_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@

__protobuf__ = proto.module(
package="google.appengine.logging.v1",
manifest={"LogLine", "SourceLocation", "SourceReference", "RequestLog",},
manifest={
"LogLine",
"SourceLocation",
"SourceReference",
"RequestLog",
},
)


Expand All @@ -42,10 +47,25 @@ class LogLine(proto.Message):
written.
"""

time = proto.Field(proto.MESSAGE, number=1, message=timestamp_pb2.Timestamp,)
severity = proto.Field(proto.ENUM, number=2, enum=log_severity_pb2.LogSeverity,)
log_message = proto.Field(proto.STRING, number=3,)
source_location = proto.Field(proto.MESSAGE, number=4, message="SourceLocation",)
time = proto.Field(
proto.MESSAGE,
number=1,
message=timestamp_pb2.Timestamp,
)
severity = proto.Field(
proto.ENUM,
number=2,
enum=log_severity_pb2.LogSeverity,
)
log_message = proto.Field(
proto.STRING,
number=3,
)
source_location = proto.Field(
proto.MESSAGE,
number=4,
message="SourceLocation",
)


class SourceLocation(proto.Message):
Expand All @@ -68,9 +88,18 @@ class SourceLocation(proto.Message):
(Go), ``function`` (Python).
"""

file = proto.Field(proto.STRING, number=1,)
line = proto.Field(proto.INT64, number=2,)
function_name = proto.Field(proto.STRING, number=3,)
file = proto.Field(
proto.STRING,
number=1,
)
line = proto.Field(
proto.INT64,
number=2,
)
function_name = proto.Field(
proto.STRING,
number=3,
)


class SourceReference(proto.Message):
Expand All @@ -88,8 +117,14 @@ class SourceReference(proto.Message):
"0035781c50ec7aa23385dc841529ce8a4b70db1b".
"""

repository = proto.Field(proto.STRING, number=1,)
revision_id = proto.Field(proto.STRING, number=2,)
repository = proto.Field(
proto.STRING,
number=1,
)
revision_id = proto.Field(
proto.STRING,
number=2,
)


class RequestLog(proto.Message):
Expand Down Expand Up @@ -205,40 +240,143 @@ class RequestLog(proto.Message):
code is distributed among multiple repositories.
"""

app_id = proto.Field(proto.STRING, number=1,)
module_id = proto.Field(proto.STRING, number=37,)
version_id = proto.Field(proto.STRING, number=2,)
request_id = proto.Field(proto.STRING, number=3,)
ip = proto.Field(proto.STRING, number=4,)
start_time = proto.Field(proto.MESSAGE, number=6, message=timestamp_pb2.Timestamp,)
end_time = proto.Field(proto.MESSAGE, number=7, message=timestamp_pb2.Timestamp,)
latency = proto.Field(proto.MESSAGE, number=8, message=duration_pb2.Duration,)
mega_cycles = proto.Field(proto.INT64, number=9,)
method = proto.Field(proto.STRING, number=10,)
resource = proto.Field(proto.STRING, number=11,)
http_version = proto.Field(proto.STRING, number=12,)
status = proto.Field(proto.INT32, number=13,)
response_size = proto.Field(proto.INT64, number=14,)
referrer = proto.Field(proto.STRING, number=15,)
user_agent = proto.Field(proto.STRING, number=16,)
nickname = proto.Field(proto.STRING, number=40,)
url_map_entry = proto.Field(proto.STRING, number=17,)
host = proto.Field(proto.STRING, number=20,)
cost = proto.Field(proto.DOUBLE, number=21,)
task_queue_name = proto.Field(proto.STRING, number=22,)
task_name = proto.Field(proto.STRING, number=23,)
was_loading_request = proto.Field(proto.BOOL, number=24,)
pending_time = proto.Field(proto.MESSAGE, number=25, message=duration_pb2.Duration,)
instance_index = proto.Field(proto.INT32, number=26,)
finished = proto.Field(proto.BOOL, number=27,)
first = proto.Field(proto.BOOL, number=42,)
instance_id = proto.Field(proto.STRING, number=28,)
line = proto.RepeatedField(proto.MESSAGE, number=29, message="LogLine",)
app_engine_release = proto.Field(proto.STRING, number=38,)
trace_id = proto.Field(proto.STRING, number=39,)
trace_sampled = proto.Field(proto.BOOL, number=43,)
app_id = proto.Field(
proto.STRING,
number=1,
)
module_id = proto.Field(
proto.STRING,
number=37,
)
version_id = proto.Field(
proto.STRING,
number=2,
)
request_id = proto.Field(
proto.STRING,
number=3,
)
ip = proto.Field(
proto.STRING,
number=4,
)
start_time = proto.Field(
proto.MESSAGE,
number=6,
message=timestamp_pb2.Timestamp,
)
end_time = proto.Field(
proto.MESSAGE,
number=7,
message=timestamp_pb2.Timestamp,
)
latency = proto.Field(
proto.MESSAGE,
number=8,
message=duration_pb2.Duration,
)
mega_cycles = proto.Field(
proto.INT64,
number=9,
)
method = proto.Field(
proto.STRING,
number=10,
)
resource = proto.Field(
proto.STRING,
number=11,
)
http_version = proto.Field(
proto.STRING,
number=12,
)
status = proto.Field(
proto.INT32,
number=13,
)
response_size = proto.Field(
proto.INT64,
number=14,
)
referrer = proto.Field(
proto.STRING,
number=15,
)
user_agent = proto.Field(
proto.STRING,
number=16,
)
nickname = proto.Field(
proto.STRING,
number=40,
)
url_map_entry = proto.Field(
proto.STRING,
number=17,
)
host = proto.Field(
proto.STRING,
number=20,
)
cost = proto.Field(
proto.DOUBLE,
number=21,
)
task_queue_name = proto.Field(
proto.STRING,
number=22,
)
task_name = proto.Field(
proto.STRING,
number=23,
)
was_loading_request = proto.Field(
proto.BOOL,
number=24,
)
pending_time = proto.Field(
proto.MESSAGE,
number=25,
message=duration_pb2.Duration,
)
instance_index = proto.Field(
proto.INT32,
number=26,
)
finished = proto.Field(
proto.BOOL,
number=27,
)
first = proto.Field(
proto.BOOL,
number=42,
)
instance_id = proto.Field(
proto.STRING,
number=28,
)
line = proto.RepeatedField(< 685C /td>
proto.MESSAGE,
number=29,
message="LogLine",
)
app_engine_release = proto.Field(
proto.STRING,
number=38,
)
trace_id = proto.Field(
proto.STRING,
number=39,
)
trace_sampled = proto.Field(
proto.BOOL,
number=43,
)
source_reference = proto.RepeatedField(
proto.MESSAGE, number=41, message="SourceReference",
proto.MESSAGE,
number=41,
message="SourceReference",
)


Expand Down
9 changes: 6 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import nox


BLACK_VERSION = "black==19.10b0"
BLACK_VERSION = "black==22.3.0"
BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]

DEFAULT_PYTHON_VERSION = "3.8"
Expand Down Expand Up @@ -57,7 +57,9 @@ def lint(session):
"""
session.install("flake8", BLACK_VERSION)
session.run(
"black", "--check", *BLACK_PATHS,
"black",
"--check",
*BLACK_PATHS,
)
session.run("flake8", "google", "tests")

Expand All @@ -67,7 +69,8 @@ def blacken(session):
"""Run black. Format code to uniform standard."""
session.install(BLACK_VERSION)
session.run(
"black", *BLACK_PATHS,
"black",
*BLACK_PATHS,
)


Expand Down
0