lock variable fix #28

Merged
Berack96 merged 1 commits from fix-lock into main 2025-10-12 23:47:56 +02:00
Berack96 commented 2025-10-12 23:45:20 +02:00 (Migrated from github.com)

Refactor the lock variable in AppConfig to use ClassVar for pydantic error.

Refactor the lock variable in AppConfig to use ClassVar for pydantic error.
copilot-pull-request-reviewer[bot] (Migrated from github.com) reviewed 2025-10-12 23:45:45 +02:00
copilot-pull-request-reviewer[bot] (Migrated from github.com) left a comment

Pull Request Overview

This pull request fixes a Pydantic compatibility issue by properly typing a class-level lock variable in the AppConfig class. The change addresses Pydantic's requirement that class variables be explicitly declared as ClassVar to distinguish them from instance fields.

  • Imports ClassVar from the typing module
  • Adds proper type annotation to the __lock class variable using ClassVar[threading.Lock]

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

## Pull Request Overview This pull request fixes a Pydantic compatibility issue by properly typing a class-level lock variable in the AppConfig class. The change addresses Pydantic's requirement that class variables be explicitly declared as `ClassVar` to distinguish them from instance fields. - Imports `ClassVar` from the typing module - Adds proper type annotation to the `__lock` class variable using `ClassVar[threading.Lock]` --- <sub>**Tip:** Customize your code reviews with copilot-instructions.md. <a href="/Berack96/upo-appAI/new/main/.github?filename=copilot-instructions.md" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">Create the file</a> or <a href="https://docs.github.com/en/copilot/customizing-copilot/adding-repository-custom-instructions-for-github-copilot" class="Link--inTextBlock" target="_blank" rel="noopener noreferrer">learn how to get started</a>.</sub>
Sign in to join this conversation.