-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: dependency package #4325
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
fix: dependency package #4325
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,7 +25,7 @@ | |
| from xlwt import Utils | ||
|
|
||
| from common.db.search import native_search, get_dynamics_model, native_page_search | ||
| from common.event import ListenerManagement | ||
| from common.event.listener_manage import ListenerManagement | ||
| from common.event.common import work_thread_pool | ||
| from common.exception.app_exception import AppApiException | ||
| from common.field.common import UploadedFileField | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The code you've provided has a few issues. The first one is that the Here's the revised version with the issue addressed: @@ -25,7 +25,7 @@
from xlwt import Utils
from common.db.search import native_search, get_dynamics_model, native_page_search
-from common.event import ListenerManagement
+from common.event.listener_management import ListenerManagement
from common.event.common import work_thread_pool
from common.exception.app_exception import AppApiException
from common.field.common import UploadedFileFieldThis change ensures that the correct import statement uses the full name of the class while removing any extraneous characters. However, there might still be other potential issues or optimizations depending on the broader context and additional features not included in this snippet. Let me know if you need further clarification or assistance! |
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,3 @@ | ||
| import logging | ||
| import traceback | ||
|
|
||
| from celery_once import QueueOnce | ||
|
|
@@ -8,7 +7,7 @@ | |
| from langchain_core.messages import HumanMessage | ||
|
|
||
| from common.config.embedding_config import ModelManage | ||
| from common.event import ListenerManagement | ||
| from common.event.listener_manage import ListenerManagement | ||
| from common.utils.logger import maxkb_logger | ||
| from common.utils.page_utils import page, page_desc | ||
| from knowledge.models import Paragraph, Document, Status, TaskType, State | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is one potential issue with this code modification. The line |
||
|
|
||
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.
This code looks mostly correct, but here are a few minor improvements and suggestions:
Import Order: The imports should be organized consistently:
Whitespace Consistency:
Ensure consistent indentation and spacing around parentheses:
Variable Naming Conventions: Use meaningful variable names if they represent specific values or objects.
Comments:
Add comments explaining purpose of
Cache_Version,update_execute, and the usage of_for translation functions. For example:Code Formatting: Although Python standardizes on PEP 8 formatting, you might want to ensure alignment within lines, especially in list comprehensions or multi-line strings:
Optional Imports: If importing all methods from a module is not necessary, consider specifying only what's used, e.g.,
from django.db.models.query import QuerySet.Here’s your modified version with these points in mind:
If you have any more specific areas where you need help or additional modifications please let me know!