Skip to content

Commit

Permalink
Black formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jhamon committed Aug 28, 2024
1 parent 1cfb1dc commit 5bf3e8d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion pinecone/control/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from .pinecone import Pinecone

from .repr_overrides import install_repr_overrides
install_repr_overrides()

install_repr_overrides()
1 change: 1 addition & 0 deletions pinecone/control/pinecone.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@

logger = logging.getLogger(__name__)


class Pinecone:
def __init__(
self,
Expand Down
3 changes: 2 additions & 1 deletion pinecone/control/repr_overrides.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@

import json


def install_repr_overrides():
"""
The generator code uses pprint.pformat to format the repr output
which looks really poor when printing a list of large objects
in a notebook setting. We override it here for a few select models
instead of modifying the generator code because the more compact output
from pprint.pformat seems better for data plane objects such as lists of
from pprint.pformat seems better for data plane objects such as lists of
query results.
"""
for model in [IndexModel, CollectionModel]:
Expand Down
1 change: 1 addition & 0 deletions pinecone/models/collection_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
CollectionList as OpenAPICollectionList,
)


class CollectionList:
"""
A list of collections.
Expand Down
2 changes: 1 addition & 1 deletion pinecone/models/index_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ def __getattr__(self, attr):

def __getitem__(self, key):
return self.__getattr__(key)

def to_dict(self):
return self.index.to_dict()

0 comments on commit 5bf3e8d

Please sign in to comment.