Skip to content

Conversation

nicogodet
Copy link
Contributor

@nicogodet nicogodet commented May 6, 2025

DESTINATION_BRANCH_TO_USE

  • is "declared" as a string

  • is always populated with a string in :

Without this change, the type of this variable becomes mixed str | bytes

But indeed, it needs to be converted to bytes at some point (here) but it's cleaner to let the function handles the conversion instead of store the branch name as bytes

In my case, I relied on str type when testing #661 and I end up comparing "main" with b"main" equals False

@nicogodet nicogodet force-pushed the decoded-branch-name branch from ecd1a3f to 8c2b21b Compare May 6, 2025 12:23
Copy link

codecov bot commented May 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #664      +/-   ##
==========================================
- Coverage   71.90%   71.84%   -0.07%     
==========================================
  Files          48       48              
  Lines        3271     3271              
  Branches      576      576              
==========================================
- Hits         2352     2350       -2     
- Misses        704      705       +1     
- Partials      215      216       +1     
Flag Coverage Δ
unittests 71.23% <ø> (-0.07%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...loyment_toolbelt/profiles/profiles_handler_base.py 69.23% <ø> (-1.10%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@nicogodet nicogodet requested a review from jmkerloch May 6, 2025 12:33
@Guts
Copy link
Collaborator

Guts commented May 12, 2025

Hello @nicogodet,

Can you explain a bit why this change please?

@nicogodet
Copy link
Contributor Author

Hello @nicogodet,

Can you explain a bit why this change please?

DESTINATION_BRANCH_TO_USE

  • is "declared" as a string

  • is always populated with a string in :

Without this change, the type of this variable becomes mixed str | bytes

But indeed, it needs to be converted to bytes at some point (here) but it's cleaner to let the function handles the conversion instead of store the branch name as bytes

In my case, I relied on str type when testing #661 and I end up comparing "main" with b"main" equals False

@Guts Guts self-requested a review May 20, 2025 08:19
Copy link
Collaborator

@Guts Guts left a comment

Choose a reason for hiding this comment

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

I've tested locally in different circumstances and it looks that it did not break anything, so let's move on!

@Guts Guts added the enhancement New feature or request label May 20, 2025
@nicogodet nicogodet force-pushed the decoded-branch-name branch from 8c2b21b to f7551aa Compare May 20, 2025 10:44
@nicogodet nicogodet force-pushed the decoded-branch-name branch from f7551aa to 0376961 Compare May 20, 2025 11:20
Copy link

@nicogodet nicogodet merged commit eeed5ae into qgis-deployment:main May 20, 2025
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants