Skip to content

Conversation

@CoolFanyu
Copy link
Collaborator

Changed version

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
deapi/client.py 25.00% 3 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions
Copy link

Preview for PR #28
View the preview here
(Built from a fork branch and deployed to PreviewDE/deapi-preview)

@CSSFrancis CSSFrancis requested a review from Copilot October 16, 2025 19:26
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the version compatibility logic in the client connection code to support version 2.8.0 of the API, adding more granular version checking that includes the fourth version component (build number).

Key Changes:

  • Updated the version check to distinguish between versions 2.7.5 and 2.8.0 using build number thresholds
  • Added additional version checking logic for version 2.7.4 variants based on build numbers
  • Updated command version assignment based on more precise version criteria

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

temp = version[2] + version[1] * 1000 + version[0] * 1000000
if temp >= 2007005:
## version after 2.7.5
if (temp >= 2007005 and version[3] < 11274) or temp >= 2008000:
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The magic number 11274 lacks explanation. Add a comment explaining why this specific build number is the threshold for version 2.7.5, or define it as a named constant for clarity.

Copilot uses AI. Check for mistakes.
elif temp >= 2007004:
## version after 2.7.4
self.commandVersion = 13
if version[3] < 10590:
Copy link

Copilot AI Oct 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The magic number 10590 lacks explanation. Add a comment explaining why this specific build number is the threshold for version 2.7.4, or define it as a named constant for clarity.

Copilot uses AI. Check for mistakes.
Copy link
Member

@CSSFrancis CSSFrancis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@CSSFrancis CSSFrancis merged commit 1eff630 into directelectron:main Oct 16, 2025
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants