From c3a470bdd5762e3bb7178ace0378d7a7373f6846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartosz=20Zaczy=C5=84ski?= Date: Mon, 13 Nov 2023 16:50:35 +0100 Subject: [PATCH] Python Serialize: Fix flake8 --- .../protocol-buffers-demo/users_pb2.py | 30 ---------------- .../protocol-buffers-demo/users_pb2.pyi | 36 ------------------- 2 files changed, 66 deletions(-) delete mode 100644 python-serialize/schema-based/protocol-buffers-demo/users_pb2.py delete mode 100644 python-serialize/schema-based/protocol-buffers-demo/users_pb2.pyi diff --git a/python-serialize/schema-based/protocol-buffers-demo/users_pb2.py b/python-serialize/schema-based/protocol-buffers-demo/users_pb2.py deleted file mode 100644 index aad00285d1..0000000000 --- a/python-serialize/schema-based/protocol-buffers-demo/users_pb2.py +++ /dev/null @@ -1,30 +0,0 @@ -# -*- coding: utf-8 -*- -# Generated by the protocol buffer compiler. DO NOT EDIT! -# source: users.proto -"""Generated protocol buffer code.""" -from google.protobuf.internal import builder as _builder -from google.protobuf import descriptor as _descriptor -from google.protobuf import descriptor_pool as _descriptor_pool -from google.protobuf import symbol_database as _symbol_database -# @@protoc_insertion_point(imports) - -_sym_db = _symbol_database.Default() - - -from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2 - - -DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0busers.proto\x12\x0e\x63om.realpython\x1a\x1fgoogle/protobuf/timestamp.proto\"\x8e\x01\n\x04User\x12\n\n\x02id\x18\x01 \x01(\x03\x12\x0c\n\x04name\x18\x02 \x01(\t\x12\r\n\x05\x65mail\x18\x03 \x01(\t\x12*\n\x08language\x18\x04 \x01(\x0e\x32\x18.com.realpython.Language\x12\x31\n\rregistered_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\",\n\x05Users\x12#\n\x05users\x18\x01 \x03(\x0b\x32\x14.com.realpython.User*2\n\x08Language\x12\x06\n\x02\x44\x45\x10\x00\x12\x06\n\x02\x45N\x10\x01\x12\x06\n\x02\x45S\x10\x02\x12\x06\n\x02\x46R\x10\x03\x12\x06\n\x02IT\x10\x04\x62\x06proto3') - -_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals()) -_builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'users_pb2', globals()) -if _descriptor._USE_C_DESCRIPTORS == False: - - DESCRIPTOR._options = None - _LANGUAGE._serialized_start=255 - _LANGUAGE._serialized_end=305 - _USER._serialized_start=65 - _USER._serialized_end=207 - _USERS._serialized_start=209 - _USERS._serialized_end=253 -# @@protoc_insertion_point(module_scope) diff --git a/python-serialize/schema-based/protocol-buffers-demo/users_pb2.pyi b/python-serialize/schema-based/protocol-buffers-demo/users_pb2.pyi deleted file mode 100644 index b07cdb4097..0000000000 --- a/python-serialize/schema-based/protocol-buffers-demo/users_pb2.pyi +++ /dev/null @@ -1,36 +0,0 @@ -from google.protobuf import timestamp_pb2 as _timestamp_pb2 -from google.protobuf.internal import containers as _containers -from google.protobuf.internal import enum_type_wrapper as _enum_type_wrapper -from google.protobuf import descriptor as _descriptor -from google.protobuf import message as _message -from typing import ClassVar as _ClassVar, Iterable as _Iterable, Mapping as _Mapping, Optional as _Optional, Union as _Union - -DE: Language -DESCRIPTOR: _descriptor.FileDescriptor -EN: Language -ES: Language -FR: Language -IT: Language - -class User(_message.Message): - __slots__ = ["email", "id", "language", "name", "registered_at"] - EMAIL_FIELD_NUMBER: _ClassVar[int] - ID_FIELD_NUMBER: _ClassVar[int] - LANGUAGE_FIELD_NUMBER: _ClassVar[int] - NAME_FIELD_NUMBER: _ClassVar[int] - REGISTERED_AT_FIELD_NUMBER: _ClassVar[int] - email: str - id: int - language: Language - name: str - registered_at: _timestamp_pb2.Timestamp - def __init__(self, id: _Optional[int] = ..., name: _Optional[str] = ..., email: _Optional[str] = ..., language: _Optional[_Union[Language, str]] = ..., registered_at: _Optional[_Union[_timestamp_pb2.Timestamp, _Mapping]] = ...) -> None: ... - -class Users(_message.Message): - __slots__ = ["users"] - USERS_FIELD_NUMBER: _ClassVar[int] - users: _containers.RepeatedCompositeFieldContainer[User] - def __init__(self, users: _Optional[_Iterable[_Union[User, _Mapping]]] = ...) -> None: ... - -class Language(int, metaclass=_enum_type_wrapper.EnumTypeWrapper): - __slots__ = []