Skip to content
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

Add type hints #1614

Merged
merged 5 commits into from
Nov 5, 2022
Merged

Add type hints #1614

merged 5 commits into from
Nov 5, 2022

Conversation

outa
Copy link
Contributor

@outa outa commented Oct 12, 2022

Add type hints to functions and methods
Uses Python 3.10 syntax

Waiting for #1611 and #1602 to be merged.

cc: #1608

Checklist

  • I have read the contributing doc.
  • I have included a link to the relevant issue number.
  • I have checked to ensure there aren't other open pull requests
    for the same issue.
  • I have written new tests for these changes, as needed.

@wren wren marked this pull request as ready for review November 5, 2022 19:54
@@ -210,7 +210,7 @@ def parse_editable_str(self, edited):
entries_from_editor = self._parse(edited)

for entry in entries_from_editor:
entry = self._get_and_remove_uuid_from_entry(entry)
self._get_and_remove_uuid_from_entry(entry)
Copy link
Member

Choose a reason for hiding this comment

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

I know this is basically a no-op, but can we avoid anything other than type hint changes in this PR (to keep it separate from everything else)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

jrnl/DayOneJournal.py Outdated Show resolved Hide resolved
Copy link
Member

@wren wren left a comment

Choose a reason for hiding this comment

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

This is such a great start towards static type checking. Thank you!

@micahellison micahellison added the build Issues related to the build pipeline label Nov 5, 2022
@micahellison micahellison merged commit 30b41fd into jrnl-org:develop Nov 5, 2022
@outa outa deleted the add-type-hints branch November 8, 2022 17:57
@outa outa mentioned this pull request Jan 8, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues related to the build pipeline
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants