From 1f308bebde74c26392b9debef12c1e69ef6f6acc Mon Sep 17 00:00:00 2001 From: wduguay-air Date: Wed, 3 Apr 2024 11:24:12 -0400 Subject: [PATCH] pre-commit --- cogment_lab/generated/cog_settings.py | 5 +++-- cogment_lab/generated/data_pb2.py | 3 ++- cogment_lab/generated/ndarray_pb2.py | 5 +++-- cogment_lab/generated/spaces_pb2.py | 3 ++- cogment_lab/protos/spaces.proto | 1 - tests/test_spaces_serialization.py | 5 ++--- 6 files changed, 12 insertions(+), 10 deletions(-) diff --git a/cogment_lab/generated/cog_settings.py b/cogment_lab/generated/cog_settings.py index f2d7e56..9e0a48d 100644 --- a/cogment_lab/generated/cog_settings.py +++ b/cogment_lab/generated/cog_settings.py @@ -1,10 +1,11 @@ +from types import SimpleNamespace import cogment as _cog -from types import SimpleNamespace +import cogment_lab.generated.data_pb2 as data_pb import cogment_lab.generated.ndarray_pb2 as ndarray_pb import cogment_lab.generated.spaces_pb2 as spaces_pb -import cogment_lab.generated.data_pb2 as data_pb + _player_class = _cog.actor.ActorClass( name="player", diff --git a/cogment_lab/generated/data_pb2.py b/cogment_lab/generated/data_pb2.py index df60944..25e6a0f 100644 --- a/cogment_lab/generated/data_pb2.py +++ b/cogment_lab/generated/data_pb2.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: data.proto """Generated protocol buffer code.""" @@ -7,6 +6,8 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database + + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() diff --git a/cogment_lab/generated/ndarray_pb2.py b/cogment_lab/generated/ndarray_pb2.py index f85547c..bc463ff 100644 --- a/cogment_lab/generated/ndarray_pb2.py +++ b/cogment_lab/generated/ndarray_pb2.py @@ -1,13 +1,14 @@ -# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: ndarray.proto """Generated protocol buffer code.""" -from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import descriptor_pool as _descriptor_pool from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database +from google.protobuf.internal import enum_type_wrapper + + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() diff --git a/cogment_lab/generated/spaces_pb2.py b/cogment_lab/generated/spaces_pb2.py index 8735b41..cb8e17a 100644 --- a/cogment_lab/generated/spaces_pb2.py +++ b/cogment_lab/generated/spaces_pb2.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: spaces.proto """Generated protocol buffer code.""" @@ -7,6 +6,8 @@ from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf import symbol_database as _symbol_database + + # @@protoc_insertion_point(imports) _sym_db = _symbol_database.Default() diff --git a/cogment_lab/protos/spaces.proto b/cogment_lab/protos/spaces.proto index f9dbef3..cdde51a 100644 --- a/cogment_lab/protos/spaces.proto +++ b/cogment_lab/protos/spaces.proto @@ -68,4 +68,3 @@ message Space { Text text = 7; } } - diff --git a/tests/test_spaces_serialization.py b/tests/test_spaces_serialization.py index 10a2333..b0676f4 100644 --- a/tests/test_spaces_serialization.py +++ b/tests/test_spaces_serialization.py @@ -12,14 +12,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -import gymnasium import numpy as np import pytest from gymnasium.spaces import Box, Dict, Discrete, MultiBinary, MultiDiscrete, Tuple - from cogment_lab.specs.ndarray_serialization import SerializationFormat -from cogment_lab.specs.spaces_serialization import deserialize_space, serialize_gym_space +from cogment_lab.specs.spaces_serialization import serialize_gym_space + # pylint: disable=no-member