forked from Backblaze/b2-sdk-python
-
Notifications
You must be signed in to change notification settings - Fork 9
Extract folder scanning module #212
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
Open
agoncharov-reef
wants to merge
17
commits into
master
Choose a base branch
from
scan-module
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
43dfd5f
Move chunks to `scan` module
agoncharov-reef ba50848
Fix file headers
agoncharov-reef d1ca3ce
UnSyncableFilename -> UnsupportedFilename
agoncharov-reef 11cb325
Refactor super()
agoncharov-reef bc38109
SyncPath -> ScanPath
agoncharov-reef eddc479
Separate Report from SyncReport
agoncharov-reef 48dcf4c
Reformat imports
agoncharov-reef bf42cb7
Don't create redundant `keep_days` variable
agoncharov-reef 8d0023f
Move `zip_folders` to `scan/scan.py`
agoncharov-reef 266aa6c
Fix imports
agoncharov-reef 95c39b8
Fix tests
agoncharov-reef 19fb2b5
Lint fix
agoncharov-reef cdba814
Update changelog
agoncharov-reef 8ac1500
Update CHANGELOG.md
agoncharov-reef df25245
Avoid calling time.time()
agoncharov-reef 60b0641
Minor fixes
agoncharov-reef d8a4c45
Extract scan tests from sync unit tests
agoncharov-reef File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| from b2sdk._v3 import B2Path | ||
|
|
||
|
|
||
| B2SyncPath = B2Path | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,7 +23,7 @@ | |
|
|
||
| from .deps_exception import UnSyncableFilename, NotADirectory, UnableToCreateDirectory, EmptyDirectory, InvalidArgument, CommandError | ||
| from .deps import FileVersionInfo | ||
| from .deps import AbstractFolder, B2Folder, LocalFolder | ||
| from .deps import B2Folder, LocalFolder | ||
| from .deps import LocalSyncPath, B2SyncPath | ||
| from .deps import ScanPoliciesManager, DEFAULT_SCAN_MANAGER | ||
| from .deps import BoundedQueueExecutor, make_folder_sync_actions, zip_folders | ||
|
|
@@ -447,8 +447,8 @@ def test_multiple_versions(self): | |
|
|
||
| self.assertEqual( | ||
| [ | ||
| "B2SyncPath(inner/a.txt, [('a2', 2000, 'upload'), ('a1', 1000, 'upload')])", | ||
| "B2SyncPath(inner/b.txt, [('b2', 1999, 'upload'), ('b1', 1001, 'upload')])" | ||
| "B2Path(inner/a.txt, [('a2', 2000, 'upload'), ('a1', 1000, 'upload')])", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it should be kept for v0, v1 and v2 |
||
| "B2Path(inner/b.txt, [('b2', 1999, 'upload'), ('b1', 1001, 'upload')])" | ||
| ], [ | ||
| str(f) for f in folder.all_files(self.reporter) | ||
| if f.relative_path in ('inner/a.txt', 'inner/b.txt') | ||
|
|
@@ -461,7 +461,7 @@ def test_exclude_modified_multiple_versions(self): | |
| ) | ||
| folder = self.prepare_folder(use_file_versions_info=True) | ||
| self.assertEqual( | ||
| ["B2SyncPath(inner/b.txt, [('b2', 1999, 'upload'), ('b1', 1001, 'upload')])"], [ | ||
| ["B2Path(inner/b.txt, [('b2', 1999, 'upload'), ('b1', 1001, 'upload')])"], [ | ||
| str(f) for f in folder.all_files(self.reporter, policies_manager=polices_manager) | ||
| if f.relative_path in ('inner/a.txt', 'inner/b.txt') | ||
| ] | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.