Skip to content
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

(test PR/ no need to review)NXDRIVE-2729: fix nuxeo drive folder icon on macos 11.4/11.5 (Sourcery refactored) #4057

Conversation

sourcery-ai[bot]
Copy link
Contributor

@sourcery-ai sourcery-ai bot commented Aug 8, 2023

Pull Request #4056 refactored by Sourcery.

If you're happy with these changes, merge this Pull Request using the Squash and merge strategy.

NOTE: As code is pushed to the original Pull Request, Sourcery will
re-run and update (force-push) this Pull Request with new refactorings as
necessary. If Sourcery finds no refactorings at any point, this Pull Request
will be closed automatically.

See our documentation here.

Run Sourcery locally

Reduce the feedback loop during development by using the Sourcery editor plugin:

Review changes via command line

To manually merge these changes, make sure you're on the wip-NXDRIVE-2729-Fix-nuxeo-drive-folder-icon-on-macos-11.4/11.5 branch, then run:

git fetch origin sourcery/wip-NXDRIVE-2729-Fix-nuxeo-drive-folder-icon-on-macos-11.4/11.5
git merge --ff-only FETCH_HEAD
git reset HEAD^

Help us improve this pull request!

@sourcery-ai sourcery-ai bot requested a review from gitofanindya August 8, 2023 05:24
if document_type == self.doc_container_type:
doc_type = None
else:
doc_type = document_type

doc_type = None if document_type == self.doc_container_type else document_type
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function Engine._direct_transfer refactored with the following changes:

Comment on lines -811 to +807
doc_pair = get_state(transfer.doc_pair)
if doc_pair:
if doc_pair := get_state(transfer.doc_pair):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function Engine._resume_transfers refactored with the following changes:

Comment on lines -986 to +981
if not url.endswith("/"):
return url + "/"
return url
return f"{url}/" if not url.endswith("/") else url
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function Engine._normalize_url refactored with the following changes:

Comment on lines -1089 to +1082
if isinstance(force, bool):
return force
return False
return force if isinstance(force, bool) else False
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function Engine.local_rollback refactored with the following changes:

Comment on lines -1125 to +1116
row = self.dao.get_state_from_id(row_id)
if row:
if row := self.dao.get_state_from_id(row_id):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function Engine.resolve_with_local refactored with the following changes:

Comment on lines -1130 to +1120
row = self.dao.get_state_from_id(row_id)
if row:
if row := self.dao.get_state_from_id(row_id):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function Engine.resolve_with_remote refactored with the following changes:

Comment on lines -1412 to +1401
root_id = self.local.get_root_id()
if root_id:
if root_id := self.local.get_root_id():
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Function Engine._check_fs refactored with the following changes:

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Sourcery AI seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@codecov
Copy link

codecov bot commented Aug 8, 2023

Codecov Report

Patch coverage: 28.57% and project coverage change: -0.30% ⚠️

Comparison is base (34890b9) 47.26% compared to head (2e697c8) 46.97%.

Additional details and impacted files
@@                                         Coverage Diff                                         @@
##           wip-NXDRIVE-2729-Fix-nuxeo-drive-folder-icon-on-macos-11.4/11.5    #4057      +/-   ##
===================================================================================================
- Coverage                                                            47.26%   46.97%   -0.30%     
===================================================================================================
  Files                                                                   93       93              
  Lines                                                                15651    15638      -13     
===================================================================================================
- Hits                                                                  7398     7346      -52     
- Misses                                                                8253     8292      +39     
Flag Coverage Δ
functional 37.70% <28.57%> (-0.14%) ⬇️
integration 1.98% <0.00%> (?)
unit 35.57% <0.00%> (-0.14%) ⬇️

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

Files Changed Coverage Δ
nxdrive/engine/engine.py 57.75% <28.57%> (+0.41%) ⬆️

... and 3 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sourcery-ai sourcery-ai bot closed this Aug 21, 2023
@sourcery-ai sourcery-ai bot deleted the sourcery/wip-NXDRIVE-2729-Fix-nuxeo-drive-folder-icon-on-macos-11.4/11.5 branch August 21, 2023 06:08
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.

1 participant