Skip to content

updated to work for python3 - #6

Closed
Salil999 wants to merge 1 commit into
diffbot:masterfrom
Salil999:master
Closed

Salil999 wants to merge 1 commit into
diffbot:masterfrom
Salil999:master

Conversation

@Salil999

Copy link
Copy Markdown

Used 2to3 -w for client.py and example.py. Updated the unit_test.py library to account for some Python3 imports.

However, I'm not 100% sure about the relative paths for importing the JSON files in unit_test.py. I had to add

import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from client import DiffbotClient

just before importing the client to resolve some directory/relative import issues. However, all the unit tests passed once those were resolved. I removed the code that appends to PATH before committing as well.

My text editor also follows the Pep8 standard for Python3 formatting, so I hope that helps as well 👍

@Salil999 Salil999 closed this May 12, 2021
@Salil999

Copy link
Copy Markdown
Author

Closing as this is stale

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.

1 participant