-
Notifications
You must be signed in to change notification settings - Fork 334
fix: better error if attempting to run on Windows, refactor readline stuff #221
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
Conversation
…e stuff into tabcomplete file
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.
👍 Looks good to me! Reviewed everything up to f7b693d in 9 seconds
More details
- Looked at
132
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. gptme/tabcomplete.py:13
- Draft comment:
Consider using a more specific exception type thanException
for better error handling. For instance,RuntimeError
might be more appropriate here. - Reason this comment was not posted:
Confidence changes required:50%
The import ofreadline
is attempted, and if it fails, an exception is raised with a message indicating that the platform is unsupported. This is a good practice for handling platform-specific dependencies.
Workflow ID: wflow_XUHdIBHaVj1jRaQq
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 32506be in 20 seconds
More details
- Looked at
13
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. gptme/init.py:14
- Draft comment:
The import statement should be corrected to reflect the new location ofload_readline_history
andregister_tabcomplete
.
from .tabcomplete import load_readline_history, register_tabcomplete
- Reason this comment was not posted:
Decided after close inspection that this draft comment was likely wrong and/or not actionable:
The comment suggests reverting the import change, but the diff and file content indicate the change was intentional. The comment lacks strong evidence of an issue, as the new import path is consistent with the diff.
I might be missing context about why the import path was changed, but based on the diff and file content, the change seems intentional.
The diff and file content provide enough context to conclude that the import change was intentional and correct.
The comment should be deleted because it contradicts the intentional change made in the diff.
Workflow ID: wflow_FRzJqizybJDO72m7
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## master #221 +/- ##
==========================================
- Coverage 75.32% 75.07% -0.25%
==========================================
Files 57 57
Lines 3582 3591 +9
==========================================
- Hits 2698 2696 -2
- Misses 884 895 +11
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
👍 Looks good to me! Incremental review on a1973b8 in 12 seconds
More details
- Looked at
45
lines of code in2
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. gptme/readline.py:33
- Draft comment:
Theadd_history
function is a good abstraction for handling readline history, especially for platform-specific issues. - Reason this comment was not posted:
Confidence changes required:0%
Theadd_history
function ingptme/readline.py
is a simple wrapper aroundreadline.add_history
. This is a good refactor as it abstracts the functionality and makes it easier to handle platform-specific issues in one place.
Workflow ID: wflow_nxHHmj29BajGXeUY
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
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.
👍 Looks good to me! Incremental review on 112cefb in 9 seconds
More details
- Looked at
15
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
1
drafted comments based on config settings.
1. tests/test_readline.py:7
- Draft comment:
Consider adding setup and teardown functions to ensure the test environment is consistent. The test assumes certain files and directories exist, which might not be the case in all environments. - Reason this comment was not posted:
Confidence changes required:50%
The test file contains a test functiontest_matches()
that uses assertions to check the behavior of the_matches
function. However, there is no setup or teardown for the test environment, which might be necessary for consistent test results. Additionally, the test assumes certain files and directories exist, which might not be the case in all environments.
Workflow ID: wflow_2bKBezFlIAhnnYeU
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
…stuff (#221) * fix: better error if attempting to run on Windows, refactored readline stuff into tabcomplete file * refactor: renamed tabcomplete file to readline * fix: removed remaining imports of readline outside of readline.py * test: fixed tests
Important
Refactor readline history handling to
readline.py
, add error handling for unsupported platforms, and clean up imports.readline.py
ifreadline
is unavailable, indicating unsupported platform (e.g., Windows)._load_readline_history()
frominit.py
toload_readline_history()
inreadline.py
.init()
ininit.py
to callload_readline_history()
fromreadline.py
.readline.add_history()
withadd_history()
inchat.py
.atexit
andreadline
frominit.py
.tabcomplete.py
toreadline.py
.This description was created by
for 112cefb. It will automatically update as commits are pushed.