Skip to content

support for new format indexes #96

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

Closed
wants to merge 3 commits into from
Closed

Conversation

raimdev
Copy link

@raimdev raimdev commented Nov 13, 2017

Try to fix issue #95

@@ -134,7 +136,7 @@ def close(self):
self._socket = None

def connect_basic(self):
if self.host == None:
if self.socket:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why're you doing this incompatible changes? use separate PR's for them.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I'll send another PR for this. I thought this repo no longer active

@@ -26,8 +26,11 @@ def __init__(self, index_row, space):
self.unique = index_row[4]
self.parts = []
if isinstance(index_row[5], (list, tuple)):
for k, v in index_row[5]:
self.parts.append((k, v))
for part in range(len(index_row[5])):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, add tests for this part of code

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. But, I've changed format of parts to dict {'field': part[0], 'type': part[1]}, because for me parts doesn't matter. I don't use them. But this change brokes backward compatibility. So, I should do this by older way? I mean like this:

if isinstance(part, list):
    self.parts.append((part[0], part[1]))
else:
    self.parts.append((part['field'], part['type']))

@raimdev
Copy link
Author

raimdev commented Feb 4, 2018

I created another PR with tests. Because changes in this PR not relevant.
This PR can be closed.

@raimdev raimdev closed this Feb 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants