Skip to content

Conversation

@lila
Copy link

@lila lila commented Jun 25, 2021

No description provided.

lila added 2 commits March 5, 2021 16:52
    - upgraded oauth to use google_auth (oauth2client has been deprecated)
    - upgraded to absl flags (python-gflags was deprecated

added setup.py for installation (python setup.py install)

added .devcontainer for vscode remote container development

added some convenience files
  .pylintrc - to get pylance to stop giving me dumb warnings
  .gitignore - to ignore build files
@lila
Copy link
Author

lila commented Jun 25, 2021

thanks for writing tasky, it has been useful for me. i forked it and updated it to use python3, and the recommended google oauth libraries. thought i would contribute it back if it is useful for you... cheers,

  • k

Copy link
Owner

@jrupac jrupac left a comment

Choose a reason for hiding this comment

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

Thanks a lot for this rewrite! This looks great!

I had added a couple of py3-specific branches a long time ago but never fully finished it up. By now, it makes sense to just have the main branch be py3 anyway.

I just had a few small comments below.

In addition, could you also update the README to mention Python 3 instead of 2.7?

[console_scripts]
tasky=tasky.__main__:main
''',
author="someone",
Copy link
Owner

Choose a reason for hiding this comment

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

It's probably fine to leave out author and author_email (lower down) since many have contributed to this over time.

TASKY_DIR = os.path.join(os.environ['HOME'], '.tasky')
KEYS_FILE = os.path.join(TASKY_DIR, 'client_id.json')
TOKEN_FILE = os.path.join(TASKY_DIR, 'user_token.json')
SCOPES = ['https://www.googleapis.com/auth/tasks']
Copy link
Owner

Choose a reason for hiding this comment

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

Since SCOPES is used in multiple files, maybe it's better to have one place where it's defined and referenced throughout?

HERE = pathlib.Path(__file__).parent

# The text of the README file
README = (HERE / "README.md").read_text()
Copy link
Owner

Choose a reason for hiding this comment

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

Use path.join here.

# Ensure that stdout is written as utf-8.
writer = codecs.getwriter('utf-8')
sys.stdout = writer(sys.stdout)
# writer = codecs.getwriter('utf-8')
Copy link
Owner

Choose a reason for hiding this comment

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

Is this not needed anymore? If it still is, I guess there's a py3 idiom for it: https://stackoverflow.com/Questions/4374455/how-to-set-sys-stdout-encoding-in-python-3

A Google Tasks command line interface.
"""

__author__ = 'Ajay Roopakalu (https://github.com/jrupac/tasky)'
Copy link
Owner

Choose a reason for hiding this comment

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

Let's just drop this line since it's not there in the other files either.

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