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
Use literals instead of str for Mode typing and typing-extensions
added as a direct requirement
#1586
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1586 +/- ##
==========================================
- Coverage 79.92% 76.46% -3.46%
==========================================
Files 292 292
Lines 14540 14544 +4
==========================================
- Hits 11621 11121 -500
- Misses 2919 3423 +504
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
typing-extensions
added as a direct requirement
@@ -309,7 +311,7 @@ def __init__( | |||
project: Optional[str] = None, | |||
api_token: Optional[str] = None, | |||
custom_run_id: Optional[str] = None, | |||
mode: Optional[str] = None, | |||
mode: Optional[Literal["async", "sync", "offline", "read-only", "debug"]] = None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Raalsky Can you elaborate on the removal of offline
from the other places?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's never been supported except for Runs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can take a look at:
raise NeptuneException("Project can't be initialized in OFFLINE mode") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thankfully it's correct in the docs, I just had a mind glitch. (We don't explicitly say "for runs only" where offline mode is described, so it may not hurt to clarify it there.)
Summary
typing-extensions
Literal
typing.Remember to adjust conda requirements as well after release.
Before submitting checklist