-
Notifications
You must be signed in to change notification settings - Fork 460
Pip to uv #305
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
base: main
Are you sure you want to change the base?
Pip to uv #305
Conversation
WalkthroughThe changes transition the project from using Changes
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (27)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (6)
🧰 Additional context used🪛 Ruff (0.8.2)app/modules/intelligence/prompts/prompt_router.py91-91: Do not perform function call (B008) 92-92: Do not perform function call (B008) app/modules/conversations/access/access_service.py71-71: Within an (B904) app/modules/intelligence/agents/custom_agents/custom_agent_model.py37-37: Undefined name (F821) app/modules/intelligence/agents/custom_agents/custom_agent_controller.py152-155: Within an (B904) 204-207: Within an (B904) 236-239: Within an (B904) 254-257: Within an (B904) app/modules/intelligence/agents/custom_agents/custom_agents_service.py463-465: Within an (B904) app/modules/intelligence/agents/custom_agents/custom_agent_router.py50-50: Do not perform function call (B008) 51-51: Do not perform function call (B008) 73-73: Do not perform function call (B008) 74-74: Do not perform function call (B008) 94-94: Do not perform function call (B008) 95-95: Do not perform function call (B008) 96-96: Do not perform function call (B008) 172-172: Do not perform function call (B008) 173-173: Do not perform function call (B008) 🪛 LanguageToolGETTING_STARTED.md[duplication] ~26-~26: Possible typo: you repeated a word. (ENGLISH_WORD_REPEAT_RULE) 🪛 markdownlint-cli2 (0.17.2)README.md197-197: Fenced code blocks should have a language specified (MD040, fenced-code-language) 201-201: Inconsistent indentation for list items at the same level (MD005, list-indent) 🔇 Additional comments (51)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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.
Actionable comments posted: 3
🧹 Nitpick comments (3)
README.md (1)
190-200
: Markdown Formatting Consistency
Minor nitpick: please double-check that list item indentations (e.g., under setup steps) are consistent with markdown linting guidelines to avoid potential formatting warnings.🧰 Tools
🪛 LanguageTool
[uncategorized] ~190-~190: Possible missing comma found.
Context: ...enerating knowledge graph and for agent reasoning respectively. These model names should ...(AI_HYDRA_LEO_MISSING_COMMA)
🪛 markdownlint-cli2 (0.17.2)
197-197: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
GETTING_STARTED.md (1)
24-28
: Updated virtual environment creation usinguv venv
.
The commanduv venv venv --python=3.10
is used to create the virtual environment. Note that the repetition of the word “venv” (once as the command and once as the directory name) is intentional; however, static analyzers might flag it as a duplicate word. Consider adding a brief comment if needed to clarify that this is the expected syntax foruv
.🧰 Tools
🪛 LanguageTool
[duplication] ~26-~26: Possible typo: you repeated a word.
Context: ...t using Python 3.10: ``` uv venv venv --python=3.10 source venv/bin/act...(ENGLISH_WORD_REPEAT_RULE)
deployment/stage/convo-server/convo.Dockerfile (1)
23-23
: Celery installation usinguv pip
confirmed.
The commandRUN uv pip install --no-cache-dir celery
is modified as expected. Verify that this installation does not cause redundancy if Celery is provided in the requirements file.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
GETTING_STARTED.md
(1 hunks)README.md
(1 hunks)deployment/prod/celery/celery.Dockerfile
(1 hunks)deployment/prod/convo-server/convo.Dockerfile
(1 hunks)deployment/prod/mom-api/api.Dockerfile
(1 hunks)deployment/stage/celery/celery.Dockerfile
(1 hunks)deployment/stage/convo-server/convo.Dockerfile
(1 hunks)deployment/stage/mom-api/api.Dockerfile
(1 hunks)dockerfile
(1 hunks)potpie-ui
(1 hunks)start.sh
(1 hunks)
🧰 Additional context used
🪛 LanguageTool
GETTING_STARTED.md
[duplication] ~26-~26: Possible typo: you repeated a word.
Context: ...t using Python 3.10: ``` uv venv venv --python=3.10 source venv/bin/act...
(ENGLISH_WORD_REPEAT_RULE)
🪛 markdownlint-cli2 (0.17.2)
README.md
197-197: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
201-201: Inconsistent indentation for list items at the same level
Expected: 3; Actual: 4
(MD005, list-indent)
🔇 Additional comments (31)
potpie-ui (1)
1-1
: Subproject Commit Reference Update
The commit reference has been updated to0f9c1dfb015c09f673c646a2fee25c6307429f7c
. This should now point to the latest subproject changes that support the transition to theuv
package manager. Please verify that this commit includes all the necessary updates (e.g., changes in dependency management, updated installation instructions) as intended by the PR objectives.start.sh (1)
37-40
: Switch to uv for Dependency Installation
The command now usesuv pip install -r requirements.txt
instead of the traditionalpip install ...
, which aligns with the overall transition in this PR. The error handling remains clear and consistent.deployment/prod/mom-api/api.Dockerfile (4)
13-16
: Add uv Package Manager Installation Step
A new step is added to installuv
usingpip install uv
before installing other dependencies. Please verify that the installed version ofuv
is compatible with your project requirements.
18-18
: Use uv to Install Requirements
The installation command now invokesuv pip install --no-cache-dir -r requirements.txt
. This change supports the migration objective.
24-24
: Update for Celery & Flower Installation
The Dockerfile now usesuv pip install --no-cache-dir celery flower
, ensuring consistency with the new package manager usage.
27-28
: Install NLTK with uv
The update toRUN uv pip install --no-cache-dir nltk
—followed by the nltk data download—ensures that dependencies are managed via uv while still setting up required NLTK data.deployment/stage/celery/celery.Dockerfile (4)
13-15
: Introduce uv Installation in Stage Environment
The added lines installinguv
(viaRUN pip install uv
) help standardize dependency management across environments. Confirm that this method works uniformly in all deployment stages.
17-17
: Transition to uv for Requirements Installation
The commandRUN uv pip install --no-cache-dir -r requirements.txt
properly replaces the earlier pip command, adhering to the project’s new package manager strategy.
23-23
: Celery and Flower Installation Updated
Switching touv pip install --no-cache-dir celery flower
is consistent and clear, ensuring that these packages are installed using the uv manager.
25-26
: Manage NLTK Installation via uv
Updating toRUN uv pip install --no-cache-dir nltk
(with the subsequent nltk data download) is a correct move to maintain uniform dependency handling.deployment/stage/mom-api/api.Dockerfile (4)
13-16
: Install uv in Deployment Stage for Mom API
The Dockerfile now installsuv
early on withRUN pip install uv
. This addition is key for ensuring the subsequent package installations are handled by uv; please verify that this installation step meets your deployment environment’s expectations.
17-17
: Update Requirements Installation to Use uv
The commandRUN uv pip install --no-cache-dir -r requirements.txt
replaces the previous installation command and is in line with the overall migration objective.
23-23
: Configure Celery & Flower Installation
Usinguv pip install --no-cache-dir celery flower
maintains the consistency of employing uv for dependency installations.
25-28
: NLTK Installation Adjusted for uv
The updated steps—installing nltk with uv and then downloading the required NLTK data—ensure that all dependencies are handled uniformly by the new package manager.README.md (3)
192-195
: Document uv Installation Instructions
A new section now explains how to install theuv
package manager with:curl -LsSf https://astral.sh/uv/install.sh | sh
This documentation update clearly supports the transition objective.
198-199
: Update Virtual Environment Creation Command
The previous command for creating a virtual environment has been replaced with:uv venv venv --python=3.10This change is consistent with the migration to uv.
203-204
: Revise Dependency Installation Instruction
The dependency installation command is updated to useuv pip install -r requirements.txt
, which reinforces the overall switch to uv for package management.dockerfile (3)
7-8
: Installation of the new package manager (uv
) step added.
The addition of the comment and the command to installuv
(RUN pip install uv
) is clear and aligns with the PR objective of switching frompip
touv
.
17-17
: Switched dependency installation to useuv pip
.
The commandRUN uv pip install --no-cache-dir -r requirements.txt
correctly replaces the original pip command and ensures consistency with the new package manager.
26-27
: NLTK installation updated usinguv pip
.
The command to install NLTK, followed by downloading the required data, has been updated appropriately. This change is consistent with the overall transition.GETTING_STARTED.md (2)
20-23
: New instructions for installinguv
package manager added.
The addition of thecurl
command to installuv
is clear and provides users with a straightforward way to set up the new package manager.
31-32
: Dependency installation command updated to useuv pip
.
Changing the command touv pip install -r requirements.txt
is consistent with the project-wide transition.deployment/prod/celery/celery.Dockerfile (3)
13-15
: Installation ofuv
in the production Celery Dockerfile.
The added command to installuv
(RUN pip install uv
) is appropriate and maintains consistency with other Dockerfiles.
17-17
: Updated requirements installation command usinguv pip
.
The commandRUN uv pip install --no-cache-dir -r requirements.txt
is correctly applied.
26-27
: NLTK installation update verified.
Usinguv pip install --no-cache-dir nltk
followed by the download command is correctly updated.deployment/prod/convo-server/convo.Dockerfile (3)
13-15
:uv
installation addition in the Convo Server production Dockerfile.
The inclusion ofRUN pip install uv
is consistent with the changes elsewhere.
17-17
: Updated dependency installation usinguv pip
.
The commandRUN uv pip install --no-cache-dir -r requirements.txt
accurately reflects the updated manager usage.
26-27
: Updated installation and setup for NLTK.
The changes for installing NLTK and downloading necessary datasets are properly updated to useuv pip
.deployment/stage/convo-server/convo.Dockerfile (3)
13-15
: Incorporation ofuv
in the staging Convo Server Dockerfile.
The installation step foruv
usingRUN pip install uv
is present and aligns with changes across the project.
17-17
: Switch touv pip
for installing dependencies.
The updated commandRUN uv pip install --no-cache-dir -r requirements.txt
is applied consistently.
26-27
: NLTK command updated to useuv pip
.
The command to install NLTK and download the required data has been updated correctly.
# Install Celery (already included if in requirements.txt) | ||
RUN uv pip install --no-cache-dir celery |
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.
🛠️ Refactor suggestion
Standalone Celery installation review.
The Dockerfile now includes a separate command to install Celery using uv pip
. Given the inline comment stating that Celery is already included in requirements.txt
, please verify if this standalone installation is still intentional or if it could potentially be redundant.
|
||
# Install supervisor | ||
RUN apt-get update && apt-get install -y supervisor | ||
|
||
# Install Celery and Flower | ||
RUN pip install --no-cache-dir celery flower | ||
RUN uv pip install --no-cache-dir celery flower |
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.
🛠️ Refactor suggestion
Combined installation of Celery and Flower using uv pip
.
The command RUN uv pip install --no-cache-dir celery flower
is now used. Please confirm that installing Celery and Flower separately from the requirements does not unintentionally duplicate dependencies.
|
||
# Install supervisor | ||
RUN apt-get update && apt-get install -y supervisor | ||
|
||
# Install Celery | ||
RUN pip install --no-cache-dir celery | ||
RUN uv pip install --no-cache-dir celery |
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.
🛠️ Refactor suggestion
Celery installation update using uv pip
.
The command now installs Celery via uv pip install --no-cache-dir celery
. As before, please verify that this standalone installation is needed if Celery is already listed in the requirements file.
GETTING_STARTED.md
Outdated
```bash | ||
pip install -r requirements.txt --use-deprecated=legacy-resolver | ||
``` | ||
uv pip install -r requirements.txt --use-deprecated=legacy-resolver |
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.
--use-deprecated=legacy-resolver
is not a command
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.
hey thats why ive commented it out, uv has its own resolver so should i remove this block completely ?
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.
keep it as a small "if youre using pip" note
@@ -10,17 +10,20 @@ WORKDIR /app | |||
# Copy the requirements file into the container | |||
COPY requirements.txt . | |||
|
|||
#install uv | |||
RUN pip install uv |
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.
why pip install uv here and curl -LsSf https://astral.sh/uv/install.sh | sh
above?
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.
@kinshuksinghbist please answer this
@@ -10,17 +10,20 @@ WORKDIR /app | |||
# Copy the requirements file into the container | |||
COPY requirements.txt . | |||
|
|||
#install uv | |||
RUN pip install uv |
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.
why pip install uv here and curl -LsSf https://astral.sh/uv/install.sh | sh
above?
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.
@kinshuksinghbist please answer this
@@ -4,23 +4,26 @@ FROM python:3.10-slim | |||
# Install system dependencies | |||
RUN apt-get update && apt-get install -y git procps | |||
|
|||
# Install uv | |||
RUN pip install uv |
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.
in all docker files can we not add this command to this line directly?: RUN uv pip install --no-cache-dir -r requirements.txt
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.
|
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.
Caution
Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.
Actionable comments posted: 1
🧹 Nitpick comments (17)
README.md (1)
192-204
: Markdown Formatting NoteA minor nitpick: please verify the indentation of list items (e.g., the hyphen used for "Install uv package manager:") to ensure consistency with the markdown style guide. Adjusting to the expected indent level can improve overall readability.
🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
197-197: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
201-201: Inconsistent indentation for list items at the same level
Expected: 3; Actual: 4(MD005, list-indent)
GETTING_STARTED.md (1)
31-36
: Update Dependency Installation Command and Commented FallbackSwitching the installation command to
uv pip install -r requirements.txt
is correct according to the new workflow. The commented fallback using--use-deprecated=legacy-resolver
is kept as a note. Given thatuv
has its own resolver, please confirm if retaining this commented block adds value or if it should be removed for clarity.app/modules/users/user_service.py (1)
161-175
: Good implementation ofget_user_by_email
methodThe new async method is well structured with appropriate error handling for both SQLAlchemyError and general exceptions. The docstring clearly describes the method's purpose and return values.
However, there's some code duplication with the existing
get_user_id_by_email
method (lines 150-159). Consider refactoring to have one method call the other to reduce duplication.You could refactor to reduce duplication:
async def get_user_by_email(self, email: str) -> User: """ Get a user by their email address. Returns the full User object or None if not found. """ try: # Use an optimized query that only fetches the user once user = self.db.query(User).filter(User.email == email).first() return user except SQLAlchemyError as e: logger.error(f"Database error fetching user by email {email}: {e}") return None except Exception as e: logger.error(f"Unexpected error fetching user by email {email}: {e}") return None def get_user_id_by_email(self, email: str) -> str: - try: - user = self.db.query(User).filter(User.email == email).first() - if user: - return user.uid - else: - return None - except Exception as e: - logger.error(f"Error fetching user ID by email {email}: {e}") - return None + user = asyncio.run(self.get_user_by_email(email)) + return user.uid if user else Noneapp/modules/intelligence/prompts/prompt_schema.py (2)
91-94
: Add documentation to RequestModel classThe new RequestModel class is missing documentation and field descriptions that are present in other schema classes throughout this file. Consider adding docstrings and Field() annotations with descriptions.
class RequestModel(BaseModel): + """Model for prompt enhancement requests.""" - conversation_id: str - prompt: str + conversation_id: str = Field(..., description="ID of the conversation to enhance the prompt for") + prompt: str = Field(..., description="The user's prompt text to be enhanced")
96-97
: Improve naming consistency in EnhancedPromptResponseThe attribute
enhancedprompt
doesn't follow the naming convention used elsewhere in the codebase (typically snake_case or with appropriate spacing).class EnhancedPromptResponse(BaseModel): - enhancedprompt: str + """Response model for enhanced prompts.""" + enhanced_prompt: str = Field(..., description="The AI-enhanced version of the user's prompt")app/modules/intelligence/agents/agents_schema.py (1)
13-13
: Good addition of visibility fieldThe visibility field is correctly added as an optional attribute with a default value of None. However, it would benefit from field validation and description similar to other Pydantic models in the codebase.
- visibility: Optional[AgentVisibility] = None + visibility: Optional[AgentVisibility] = Field(None, description="Visibility settings for the agent")app/modules/conversations/conversation/conversation_schema.py (1)
48-48
: Good addition of visibility fieldThe new field follows the established pattern in the class and is correctly marked as Optional with an appropriate default value. Consider adding a Field description for better documentation.
- visibility: Optional[Visibility] = None + visibility: Optional[Visibility] = Field(None, description="Visibility setting for the conversation")app/modules/conversations/access/access_service.py (1)
64-71
: Fix exception chaining in the general exception handler.The specific
IntegrityError
handler preserves the exception chain withfrom e
, but the general exception handler doesn't follow this pattern.- raise ShareChatServiceError(f"Failed to update shared chat: {str(e)}") + raise ShareChatServiceError(f"Failed to update shared chat: {str(e)}") from e🧰 Tools
🪛 Ruff (0.8.2)
71-71: Within an
except
clause, raise exceptions withraise ... from err
orraise ... from None
to distinguish them from errors in exception handling(B904)
app/modules/intelligence/prompts/prompt_service.py (2)
346-396
: Enhance error handling in the prompt enhancement method.While the method correctly logs errors, consider adding more specific exception handling for different error types that might occur during LLM calls, like rate limits, timeout errors, or malformed responses.
try: provider_service = ProviderService(self.db, user["user_id"]) result = await provider_service.call_llm_with_structured_output( messages=messages, output_schema=EnhancedPromptResponse, size="large" ) return result.enhancedprompt +except ValueError as e: + logger.error(f"Invalid response format from LLM: {e}") + raise PromptServiceError(f"Failed to parse enhanced prompt: {str(e)}") from e +except TimeoutError as e: + logger.error(f"LLM request timed out: {e}") + raise PromptServiceError("Request to enhance prompt timed out") from e except Exception as e: logger.error(f"Enhancing failed: {e}") - raise + raise PromptServiceError(f"Failed to enhance prompt: {str(e)}") from e
399-401
: Add docstring toget_prompt
function.Adding a docstring would improve code readability and help other developers understand the function's purpose.
def get_prompt(prompt_key: str) -> str: + """ + Retrieve a prompt template by its key from the PROMPTS dictionary. + + Args: + prompt_key: The key of the prompt template to retrieve + + Returns: + The prompt template string or a default message if not found + """ return PROMPTS.get(prompt_key, "Prompt not found.")app/modules/intelligence/agents/custom_agents/custom_agent_model.py (4)
4-4
: Consider importingUser
to fully leverage theList
type hint.
The added import forList
is appropriate, but you also need to ensure theUser
model is imported as it’s referenced elsewhere in this file.
21-21
: Consider using an enum orAgentVisibility
for this column.
Storing string values forvisibility
is fine, but leveraging yourAgentVisibility
enum directly can provide additional type safety and reduce bugs down the road.- visibility = Column(String, default="private", nullable=False) + from sqlalchemy import Enum + from app.modules.intelligence.agents.custom_agents.custom_agent_schema import AgentVisibility + visibility = Column(Enum(AgentVisibility, native_enum=False), default=AgentVisibility.PRIVATE.value, nullable=False)
30-30
: Clarify or remove the generic “Add relationships” comment.
This comment is a bit too general. If it doesn't add meaningful context, consider removing it or expanding it to explain what's being related and why.
41-59
: Add indexes or constraints for performance and clarity.
The newcustom_agent_shares
table looks good. However, you might consider indexes onagent_id
andshared_with_user_id
for faster lookups if sharing grows in usage.CREATE INDEX idx_agent_id ON custom_agent_shares(agent_id); CREATE INDEX idx_shared_with_user_id ON custom_agent_shares(shared_with_user_id);app/modules/intelligence/agents/custom_agents/custom_agents_service.py (2)
461-465
: Consider chaining the original exception.
When re-raising a new exception inside anexcept
block, Python best practices recommend usingraise HTTPException(...) from e
orraise HTTPException(...) from None
to differentiate it from errors in exception handling.- raise HTTPException( - status_code=500, detail=f"Failed to update agent: {str(e)}" - ) + raise HTTPException( + status_code=500, detail=f"Failed to update agent: {str(e)}" + ) from e🧰 Tools
🪛 Ruff (0.8.2)
463-465: Within an
except
clause, raise exceptions withraise ... from err
orraise ... from None
to distinguish them from errors in exception handling(B904)
865-926
: Potential duplication in ownership checks.
The logic inget_custom_agent
repeats ownership/public/shared checks that appear in other methods. Consider factoring out these permission checks into a shared helper method for maintainability and consistency.app/modules/intelligence/agents/custom_agents/custom_agent_controller.py (1)
152-155
: Follow best practices for exception chaining.
When raising a new exception inside anexcept
clause, consider using an explicitfrom e
clause (as recommended by static analysis rule B904). This provides better clarity in traceback logs, indicating that the new exception was caused by the original exception.Example fix:
- raise HTTPException( - status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, - detail=f"Failed to manage agent sharing: {str(e)}", - ) + raise HTTPException( + status_code=status.HTTP_500_INTERNAL_SERVER_ERROR, + detail=f"Failed to manage agent sharing: {str(e)}", + ) from eAlso applies to: 204-207, 236-239, 254-257
🧰 Tools
🪛 Ruff (0.8.2)
152-155: Within an
except
clause, raise exceptions withraise ... from err
orraise ... from None
to distinguish them from errors in exception handling(B904)
🛑 Comments failed to post (1)
app/modules/intelligence/agents/custom_agents/custom_agent_model.py (1)
36-39:
⚠️ Potential issueImport the
User
model to fix the undefined name error.
According to the static analysis hint (F821),User
is currently undefined. Make sure you have the correct import in this file or an appropriate referencing string if using a deferred import.+ from app.modules.auth.models import User # Or the correct path to the User model @property def shared_with_users(self) -> List["User"]: return [share.shared_with_user for share in self.shares]
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.from app.modules.auth.models import User # Or the correct path to the User model @property def shared_with_users(self) -> List["User"]: return [share.shared_with_user for share in self.shares]
🧰 Tools
🪛 Ruff (0.8.2)
37-37: Undefined name
User
(F821)
``` | ||
If you face any issues with the dependencies, you can try installing the dependencies using the following command: | ||
(If you are using pip)If you face any issues with the dependencies, you can try installing the dependencies using the following command: |
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.
(If you are using pip)If you face any issues with the dependencies, you can try installing the dependencies using the following command: | |
If you face any issues with installing the dependencies, you can try installing them using pip with the following command: |
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.
ref above comments
Summary by CodeRabbit