Repository Analysis

borgbackup/borg

Deduplicating archiver with compression and authenticated encryption.

20.4 Moderate AI signal View on GitHub
20.4
Adjusted Score
20.4
Raw Score
100%
Time Factor
2026-05-30
Last Push
13,381
Stars
Python
Language
63,192
Lines of Code
240
Files
1046
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 0HIGH 50MEDIUM 61LOW 935

Pattern Findings

1046 matches across 13 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers385 hits · 386 pts
SeverityFileLineSnippet
LOWsrc/borg/fslocking.py427 def _wait_for_readers_finishing(self, remove, sleep):
LOWsrc/borg/conftest.py137 def maybe_clear_flags_and_retry(func, path, _exc_info):
LOWsrc/borg/patterns.py127 def get_unmatched_include_patterns(self):
LOWsrc/borg/manifest.py45 def get_first_and_last_archive_ts(archives_list):
LOWsrc/borg/manifest.py497 def check_repository_compatibility(self, operations):
LOWsrc/borg/manifest.py511 def get_all_mandatory_features(self):
LOWsrc/borg/security.py138 def assert_no_manifest_replay(self, manifest, key):
LOWsrc/borg/cache.py57def discover_files_cache_names(path, files_cache_name="files"):
LOWsrc/borg/cache.py347 def discover_files_cache_names(self, path):
LOWsrc/borg/cache.py544def write_chunkindex_to_repo_cache(
LOWsrc/borg/cache.py599def read_chunkindex_from_repo_cache(repository, hash):
LOWsrc/borg/cache.py616def build_chunkindex_from_repo(repository, *, disable_caches=False, cache_immediately=False):
LOWsrc/borg/cache.py738 def _maybe_write_chunks_cache(self, now, force=False, clear=False):
LOWsrc/borg/cache.py850 def check_cache_compatibility(self):
LOWsrc/borg/archive.py1931 def rebuild_archives_directory(self):
LOWsrc/borg/crypto/key.py609 def get_existing_or_new_target(self, args):
LOWsrc/borg/crypto/key.py639 def _find_key_file_from_environment(self):
LOWsrc/borg/crypto/key.py644 def _get_new_target_in_keys_dir(self, args):
LOWsrc/borg/testsuite/compress_test.py154def test_additive_obfuscation(specs, c_type, obfuscation_padding: int):
LOWsrc/borg/testsuite/compress_test.py192def test_default_compression_level(c_type, c_name):
LOWsrc/borg/testsuite/compress_test.py204def test_specified_compression_level(c_type, c_name, c_levels):
LOWsrc/borg/testsuite/compress_test.py212def test_invalid_compression_level(invalid_spec):
LOWsrc/borg/testsuite/compress_test.py254def test_robj_specific_obfuscation(data_length, expected_padding, robj_type):
LOWsrc/borg/testsuite/archives_test.py80def test_finish_returns_empty_dict():
LOWsrc/borg/testsuite/archives_test.py90def test_ids_returns_binary_ids():
LOWsrc/borg/testsuite/archives_test.py96def test_ids_store_object_not_found_gives_empty():
LOWsrc/borg/testsuite/archives_test.py102def test_ids_passes_deleted_flag():
LOWsrc/borg/testsuite/archives_test.py159def test_exists_name_and_id_true():
LOWsrc/borg/testsuite/archives_test.py165def test_exists_name_and_id_false_wrong_name():
LOWsrc/borg/testsuite/archives_test.py171def test_exists_name_and_id_false_wrong_id():
LOWsrc/borg/testsuite/archives_test.py177def test_exists_name_and_ts_true():
LOWsrc/borg/testsuite/archives_test.py183def test_exists_name_and_ts_false_wrong_ts():
LOWsrc/borg/testsuite/archives_test.py189def test_exists_name_and_ts_false_wrong_name():
LOWsrc/borg/testsuite/archives_test.py195def test_get_archive_meta_object_not_found():
LOWsrc/borg/testsuite/archives_test.py258def test_get_archive_meta_bad_version():
LOWsrc/borg/testsuite/archives_test.py267def test_get_missing_returns_none():
LOWsrc/borg/testsuite/archives_test.py273def test_get_returns_archive_archiveinfo():
LOWsrc/borg/testsuite/archives_test.py333def test_create_calls_store_store():
LOWsrc/borg/testsuite/archives_test.py339def test_create_with_datetime_ts():
LOWsrc/borg/testsuite/archives_test.py346def test_create_overwrite_kwarg_ignored():
LOWsrc/borg/testsuite/archives_test.py523def test_get_one_no_match_raises():
LOWsrc/borg/testsuite/archives_test.py529def test_get_one_multiple_matches_raises():
LOWsrc/borg/testsuite/archives_test.py537def test_get_one_deleted_passes_flag():
LOWsrc/borg/testsuite/archives_test.py545def test_list_considering_raises_if_name_set():
LOWsrc/borg/testsuite/archives_test.py553def test_list_considering_delegates():
LOWsrc/borg/testsuite/archives_test.py54def _stub_matching_info_tuples(infos):
LOWsrc/borg/testsuite/archives_test.py66def test_archives_satisfies_archives_interface():
LOWsrc/borg/testsuite/archives_test.py210def test_get_archive_meta_success():
LOWsrc/borg/testsuite/archives_test.py238def test_get_archive_meta_success_with_tags():
LOWsrc/borg/testsuite/archives_test.py292def test_get_by_id_missing_returns_none():
LOWsrc/borg/testsuite/archives_test.py315def test_get_by_id_exists_false_returns_none():
LOWsrc/borg/testsuite/archives_test.py378def test_list_sort_by_str_raises():
LOWsrc/borg/testsuite/archives_test.py384def test_list_sort_generator_not_materialised_regression():
LOWsrc/borg/testsuite/archives_test.py439def test_list_deleted_passes_flag():
LOWsrc/borg/testsuite/archives_test.py453def test_list_match_name_prefix():
LOWsrc/borg/testsuite/archives_test.py488def test_list_match_aid_ambiguous():
LOWsrc/borg/testsuite/archives_test.py500def test_list_match_multiple_patterns():
LOWsrc/borg/testsuite/archives_test.py509def test_list_match_end_custom():
LOWsrc/borg/testsuite/archives_test.py573def test_list_considering_with_match_archives():
LOWsrc/borg/testsuite/archives_test.py593def test_list_considering_multi_key_sort():
325 more matches not shown…
Unused Imports356 hits · 258 pts
SeverityFileLineSnippet
LOWscripts/errorlist.py7
LOWscripts/errorlist.py8
LOWsrc/borg/repoobj.py4
LOWsrc/borg/repoobj.py138
LOWsrc/borg/manifest.py15
LOWsrc/borg/remote.py25
LOWsrc/borg/cache.py167
LOWsrc/borg/cache.py167
LOWsrc/borg/cache.py167
LOWsrc/borg/cache.py167
LOWsrc/borg/cache.py167
LOWsrc/borg/fuse_impl.py8
LOWsrc/borg/archive.py28
LOWsrc/borg/repository.py11
LOWsrc/borg/crypto/key.py16
LOWsrc/borg/crypto/keymanager.py162
LOWsrc/borg/chunkers/__init__.py5
LOWsrc/borg/testsuite/__init__.py23
LOWsrc/borg/testsuite/__init__.py23
LOWsrc/borg/testsuite/__init__.py23
LOWsrc/borg/testsuite/__init__.py23
LOWsrc/borg/testsuite/__init__.py23
LOWsrc/borg/testsuite/chunkers/buzhash64_self_test.py8
LOWsrc/borg/testsuite/chunkers/buzhash64_test.py11
LOWsrc/borg/testsuite/chunkers/fixed_self_test.py7
LOWsrc/borg/testsuite/chunkers/buzhash_self_test.py8
LOWsrc/borg/testsuite/chunkers/__init__.py4
LOWsrc/borg/testsuite/chunkers/interaction_test.py6
LOWsrc/borg/testsuite/chunkers/reader_test.py9
LOWsrc/borg/testsuite/chunkers/fixed_test.py10
LOWsrc/borg/testsuite/chunkers/buzhash_test.py10
LOWsrc/borg/testsuite/chunkers/failing_test.py6
LOWsrc/borg/testsuite/archiver/repo_list_cmd_test.py4
LOWsrc/borg/testsuite/archiver/tar_cmds_test.py8
LOWsrc/borg/testsuite/archiver/prune_cmd_test.py7
LOWsrc/borg/testsuite/archiver/extract_cmd_test.py13
LOWsrc/borg/testsuite/archiver/help_cmd_test.py3
LOWsrc/borg/testsuite/archiver/return_codes_test.py3
LOWsrc/borg/testsuite/archiver/list_cmd_test.py5
LOWsrc/borg/testsuite/archiver/recreate_cmd_test.py8
LOWsrc/borg/testsuite/archiver/delete_cmd_test.py1
LOWsrc/borg/testsuite/archiver/debug_cmds_test.py5
LOWsrc/borg/testsuite/archiver/compact_cmd_test.py5
LOWsrc/borg/testsuite/archiver/repo_space_cmd_test.py1
LOWsrc/borg/testsuite/archiver/create_cmd_test.py13
LOWsrc/borg/testsuite/archiver/corruption_test.py7
LOWsrc/borg/testsuite/archiver/__init__.py20
LOWsrc/borg/testsuite/archiver/__init__.py30
LOWsrc/borg/testsuite/archiver/repo_delete_cmd_test.py5
LOWsrc/borg/testsuite/archiver/repo_create_cmd_test.py7
LOWsrc/borg/testsuite/archiver/undelete_cmd_test.py1
LOWsrc/borg/testsuite/archiver/analyze_cmd_test.py3
LOWsrc/borg/testsuite/archiver/rename_cmd_test.py1
LOWsrc/borg/testsuite/archiver/patterns_test.py2
LOWsrc/borg/testsuite/archiver/transfer_cmd_test.py13
LOWsrc/borg/testsuite/archiver/mount_cmds_test.py15
LOWsrc/borg/testsuite/archiver/repo_info_cmd_test.py3
LOWsrc/borg/testsuite/archiver/diff_cmd_test.py8
LOWsrc/borg/testsuite/archiver/tag_cmd_test.py1
LOWsrc/borg/testsuite/archiver/checks_test.py8
296 more matches not shown…
Cross-File Repetition38 hits · 190 pts
SeverityFileLineSnippet
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/legacy/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/legacy/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/legacy/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/legacy/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/legacy/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/legacy/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/legacy/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/legacy/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/legacy/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/legacy/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/legacy/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/legacy/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/legacy/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/legacy/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/legacy/remote.py0actual remoting is done via self.call in the @api decorator
HIGHsrc/borg/testsuite/helpers/fs_test.py0test that it works the same for legacy and for non-legacy implementation
HIGHsrc/borg/testsuite/helpers/fs_test.py0test that it works the same for legacy and for non-legacy implementation
HIGHsrc/borg/testsuite/helpers/fs_test.py0test that it works the same for legacy and for non-legacy implementation
Deep Nesting125 hits · 121 pts
SeverityFileLineSnippet
LOWscripts/make.py46
LOWscripts/make.py113
LOWscripts/make.py164
LOWsrc/borg/fslocking.py138
LOWsrc/borg/fslocking.py207
LOWsrc/borg/fslocking.py291
LOWsrc/borg/version.py36
LOWsrc/borg/manifest.py201
LOWsrc/borg/remote.py203
LOWsrc/borg/remote.py402
LOWsrc/borg/remote.py685
LOWsrc/borg/remote.py744
LOWsrc/borg/remote.py1212
LOWsrc/borg/remote.py204
LOWsrc/borg/remote.py769
LOWsrc/borg/hlfuse.py188
LOWsrc/borg/hlfuse.py257
LOWsrc/borg/hlfuse.py463
LOWsrc/borg/hlfuse.py619
LOWsrc/borg/hlfuse.py466
LOWsrc/borg/cache.py616
LOWsrc/borg/cache.py284
LOWsrc/borg/cache.py350
LOWsrc/borg/cache.py393
LOWsrc/borg/xattr.py60
LOWsrc/borg/xattr.py99
LOWsrc/borg/archive.py150
LOWsrc/borg/archive.py277
LOWsrc/borg/archive.py299
LOWsrc/borg/archive.py742
LOWsrc/borg/archive.py764
LOWsrc/borg/archive.py948
LOWsrc/borg/archive.py1151
LOWsrc/borg/archive.py1325
LOWsrc/borg/archive.py1421
LOWsrc/borg/archive.py1568
LOWsrc/borg/archive.py1719
LOWsrc/borg/archive.py1856
LOWsrc/borg/archive.py1931
LOWsrc/borg/archive.py2001
LOWsrc/borg/archive.py2341
LOWsrc/borg/archive.py2044
LOWsrc/borg/storelocking.py165
LOWsrc/borg/repository.py95
LOWsrc/borg/repository.py291
LOWsrc/borg/repository.py419
LOWsrc/borg/fuse.py516
LOWsrc/borg/fuse.py703
LOWsrc/borg/fuse.py519
LOWsrc/borg/crypto/key.py388
LOWsrc/borg/crypto/keymanager.py159
LOWsrc/borg/chunkers/failing.py29
LOWsrc/borg/testsuite/chunkers/buzhash64_test.py24
LOWsrc/borg/testsuite/chunkers/interaction_test.py21
LOWsrc/borg/testsuite/chunkers/fixed_test.py13
LOWsrc/borg/testsuite/chunkers/buzhash_test.py18
LOWsrc/borg/testsuite/platform/platform_test.py31
LOWsrc/borg/testsuite/archiver/extract_cmd_test.py185
LOWsrc/borg/testsuite/archiver/extract_cmd_test.py188
LOWsrc/borg/testsuite/archiver/create_cmd_test.py1052
65 more matches not shown…
Self-Referential Comments31 hits · 98 pts
SeverityFileLineSnippet
MEDIUMdocs/conf.py4# This file is execfile()d with the current directory set to its containing directory.
MEDIUM.github/workflows/ci.yml510 # Create a FFS image with extended attributes enabled and use it for TMPDIR.
MEDIUMsrc/borg/hlfuse.py164 # Create a directory item for the archive
MEDIUMsrc/borg/testsuite/cache_test.py64 # Create a cache entry so list_chunkindex_hashes finds it.
MEDIUMsrc/borg/testsuite/repoobj_test.py114 # Create a repository object containing user data (file content data).
MEDIUMsrc/borg/testsuite/repoobj_test.py126 # Create a repository object containing user data (file content data).
MEDIUMsrc/borg/testsuite/legacyrepository_test.py75 # Create a raw chunk that has a valid RepoObj layout but does not use encryption or compression.
MEDIUMsrc/borg/testsuite/crypto/csprng_test.py170 # Create a large list
MEDIUMsrc/borg/testsuite/crypto/crypto_test.py285 # Create a simple KeyBase subclass with a non-empty crypt_key
MEDIUMsrc/borg/testsuite/chunkers/reader_test.py133 # Create a mock FileFMAPReader that yields specific chunks
MEDIUMsrc/borg/testsuite/chunkers/reader_test.py145 # Create a FileReader with a dummy BytesIO to satisfy the assertion
MEDIUMsrc/borg/testsuite/chunkers/reader_test.py271 # Create a file with all zeros
MEDIUMsrc/borg/testsuite/chunkers/reader_test.py288 # Create a sparse file
MEDIUMsrc/borg/testsuite/chunkers/reader_test.py336 # Create a reader with sparse=False
MEDIUMsrc/borg/testsuite/archiver/tar_cmds_test.py220 # Create a simple directory structure
MEDIUMsrc/borg/testsuite/archiver/tar_cmds_test.py223 # Create a tar file with paths starting with './'
MEDIUMsrc/borg/testsuite/archiver/transfer_cmd_test.py344 # Create an archive with a comment
MEDIUMsrc/borg/testsuite/archiver/diff_cmd_test.py48 # Create the first snapshot
MEDIUMsrc/borg/testsuite/archiver/diff_cmd_test.py78 # Create the second snapshot
MEDIUM…borg/testsuite/archiver/restricted_permissions_test.py17 # Create a repository with unrestricted permissions.
MEDIUM…borg/testsuite/archiver/restricted_permissions_test.py42 # Create a repository first (need unrestricted permissions for that).
MEDIUM…borg/testsuite/archiver/restricted_permissions_test.py94 # Create a repository first (need unrestricted permissions for that).
MEDIUM…borg/testsuite/archiver/restricted_permissions_test.py98 # Create an archive to test with.
MEDIUM…borg/testsuite/archiver/restricted_permissions_test.py140 # Create a repository first (need unrestricted permissions for that).
MEDIUM…borg/testsuite/archiver/restricted_permissions_test.py144 # Create an initial archive to test with.
MEDIUMsrc/borg/testsuite/helpers/fs_test.py382 # Create a directory with both a CACHEDIR.TAG and a custom tag file
MEDIUMsrc/borg/testsuite/helpers/fs_test.py389 # Create a directory without any tag files
MEDIUMsrc/borg/archiver/transfer_cmd.py52 # Create a chunker with the specified parameters
MEDIUMsrc/borg/archiver/repo_space_cmd.py70 # Create a new repository:
MEDIUMsrc/borg/archiver/help_cmd.py224 # Define the recursion root
MEDIUMsrc/borg/helpers/fs.py199 # This file is a cache directory tag created by Borg.
Decorative Section Separators19 hits · 72 pts
SeverityFileLineSnippet
MEDIUMsrc/borg/testsuite/legacy_upgrade_test.py43# ── upgrade_item ──────────────────────────────────────────────────────────────
MEDIUMsrc/borg/testsuite/legacy_upgrade_test.py117# ── upgrade_archive_metadata ──────────────────────────────────────────────────
MEDIUMsrc/borg/testsuite/legacy_upgrade_test.py180# ── upgrade_compressed_chunk ──────────────────────────────────────────────────
MEDIUMsrc/borg/testsuite/legacy_upgrade_test.py18# ── helpers ───────────────────────────────────────────────────────────────────
MEDIUMsrc/borg/testsuite/legacy_archives_test.py121# ── create ───────────────────────────────────────────────────────────────────────
MEDIUMsrc/borg/testsuite/legacy_archives_test.py149# ── get / get_by_id ───────────────────────────────────────────────────────────────
MEDIUMsrc/borg/testsuite/legacy_archives_test.py189# ── NotImplementedError stubs ──────────────────────────────────────────────────────
MEDIUMsrc/borg/testsuite/legacy_archives_test.py228# ── _get_archive_meta ────────────────────────────────────────────────────────────
MEDIUMsrc/borg/testsuite/legacy_archives_test.py401# ── get_one ───────────────────────────────────────────────────────────────────────
MEDIUMsrc/borg/testsuite/legacy_archives_test.py424# ── list_considering ──────────────────────────────────────────────────────────────
MEDIUMsrc/borg/testsuite/legacy_archives_test.py454# ── ArchivesInterface Protocol / Manifest dispatch ────────────────────────────────
MEDIUMsrc/borg/testsuite/legacy_archives_test.py16# ── helpers ──────────────────────────────────────────────────────────────────────
MEDIUMsrc/borg/testsuite/legacy_archives_test.py65# ── init / raw-dict operations ───────────────────────────────────────────────────
MEDIUMsrc/borg/testsuite/legacy_archives_test.py278# ── _infos / _info_tuples ────────────────────────────────────────────────────────
MEDIUMsrc/borg/testsuite/legacy_archives_test.py293# ── list ──────────────────────────────────────────────────────────────────────────
MEDIUMsrc/borg/archiver/tar_cmds.py191 # ----------
MEDIUMsrc/borg/archiver/tar_cmds.py199 # -----------
MEDIUMsrc/borg/cockpit/widgets.py316 # --------------------------
MEDIUMsrc/borg/cockpit/widgets.py327 # --------------
Cross-Language Confusion12 hits · 65 pts
SeverityFileLineSnippet
HIGHsrc/borg/archiver/completion_cmd.py108 out=$( borg repo-list "${repo_arg[@]}" --format '{id}{NL}' 2>/dev/null </dev/null )
HIGHsrc/borg/archiver/completion_cmd.py110 out=$( borg repo-list --format '{id}{NL}' 2>/dev/null </dev/null )
HIGHsrc/borg/archiver/completion_cmd.py127 out=$( borg repo-list "${repo_arg[@]}" --format '{archive}{NL}' 2>/dev/null </dev/null )
HIGHsrc/borg/archiver/completion_cmd.py129 out=$( borg repo-list --format '{archive}{NL}' 2>/dev/null </dev/null )
HIGHsrc/borg/archiver/completion_cmd.py178 out=$( borg repo-list "${repo_arg[@]}" --format '{tags}{NL}' 2>/dev/null </dev/null )
HIGHsrc/borg/archiver/completion_cmd.py180 out=$( borg repo-list --format '{tags}{NL}' 2>/dev/null </dev/null )
HIGHsrc/borg/archiver/completion_cmd.py380 2>/dev/null </dev/null )
HIGHsrc/borg/archiver/completion_cmd.py383 2>/dev/null </dev/null )
HIGHsrc/borg/archiver/completion_cmd.py407 out=$( borg repo-list "${repo_arg[@]}" --format '{archive}{NL}' 2>/dev/null </dev/null )
HIGHsrc/borg/archiver/completion_cmd.py409 out=$( borg repo-list --format '{archive}{NL}' 2>/dev/null </dev/null )
HIGHsrc/borg/archiver/completion_cmd.py463 out=$( borg repo-list "${repo_arg[@]}" --format '{tags}{NL}' 2>/dev/null </dev/null )
HIGHsrc/borg/archiver/completion_cmd.py465 out=$( borg repo-list --format '{tags}{NL}' 2>/dev/null </dev/null )
Excessive Try-Catch Wrapping34 hits · 42 pts
SeverityFileLineSnippet
LOWsrc/borg/remote.py650 except Exception:
MEDIUMsrc/borg/remote.py89def __init__(self, data):
LOWsrc/borg/logger.py183 except Exception as err: # XXX be more precise
LOWsrc/borg/archive.py2114 except Exception:
LOWsrc/borg/repository.py189 except Exception:
LOWsrc/borg/testsuite/logger_test.py56 except Exception:
LOWsrc/borg/testsuite/archiver/extract_cmd_test.py620 except Exception:
LOWsrc/borg/testsuite/archiver/remote_repo_test.py24 except Exception:
LOWsrc/borg/testsuite/archiver/remote_repo_test.py29 except Exception:
LOWsrc/borg/archiver/__init__.py507 except Exception:
LOWsrc/borg/archiver/__init__.py515 except Exception:
LOWsrc/borg/archiver/__init__.py589 except Exception:
LOWsrc/borg/archiver/__init__.py629 except Exception as e:
LOWsrc/borg/legacy/remote.py345 except Exception:
MEDIUMsrc/borg/legacy/remote.py83def __init__(self, data):
LOWsrc/borg/legacy/repository.py998 except Exception as exc:
LOWsrc/borg/cockpit/runner.py61 except Exception as e:
LOWsrc/borg/helpers/msgpack.py105 except Exception as e:
LOWsrc/borg/helpers/msgpack.py113 except Exception as e:
LOWsrc/borg/helpers/msgpack.py121 except Exception as e:
LOWsrc/borg/helpers/msgpack.py163 except Exception as e:
LOWsrc/borg/helpers/msgpack.py171 except Exception as e:
LOWsrc/borg/helpers/msgpack.py184 except Exception as e:
LOWsrc/borg/helpers/msgpack.py195 except Exception as e:
MEDIUMsrc/borg/helpers/msgpack.py102def pack(self, obj):
MEDIUMsrc/borg/helpers/msgpack.py158def unpack(self):
MEDIUMsrc/borg/helpers/msgpack.py166def __next__(self):
LOWsrc/borg/helpers/__init__.py208 except Exception: # nosec B110
LOWsrc/borg/helpers/fs.py86 except Exception:
LOWsrc/borg/helpers/fs.py92 except Exception: # nosec B110
LOWsrc/borg/helpers/fs.py109 except Exception: # nosec B110
LOWsrc/borg/helpers/process.py386 except Exception:
LOWsrc/borg/helpers/parseformat.py359 except Exception as e:
MEDIUMsrc/borg/helpers/parseformat.py50def hex_to_bin(hex, length=None):
Over-Commented Block22 hits · 22 pts
SeverityFileLineSnippet
LOWpyproject.toml121# E402 module level import not at top
LOWdocs/conf.py1# Documentation build configuration file, created by
LOWdocs/conf.py61# language = None
LOWdocs/conf.py81# add_function_parentheses = True
LOWdocs/conf.py121html_theme_options = {"project_nav_name": "Borg %s" % version}
LOWdocs/conf.py161# Additional templates that should be rendered to pages, maps page names to
LOWdocs/conf.py201# The name of an image file (relative to this directory) to place at the top of
LOWsrc/borg/manifest.py421 # The comments here only roughly describe the scope of each feature. In the end, additions need to be
LOWsrc/borg/paperkey.html21// https://github.com/kazuhikoarase/qrcode-generator/blob/master/js/qrcode.js
LOWsrc/borg/remote.py101
LOWsrc/borg/remote.py701 else:
LOWsrc/borg/archive.py1501 if st.st_ctime_ns != st2.st_ctime_ns:
LOWsrc/borg/fuse.py121 # The meta-array contains chunk IDs and item entries (described in iter_archive_items).
LOWsrc/borg/testsuite/legacyrepository_test.py441 # nuke index, force replay
LOWsrc/borg/archiver/tar_cmds.py61 # A quick note about the general design of tar_filter and tarfile;
LOWsrc/borg/archiver/tar_cmds.py181 "%s: unsupported file type %o for tar export", remove_surrogates(item.path), modebits
LOWsrc/borg/legacy/remote.py101# too old servers. This ensures that the knowledge what is compatible is always held by the newer component.
LOWsrc/borg/legacy/remote.py401
LOWsrc/borg/legacy/repository.py661 # (which may grow the index up to twice its current size).
LOWsrc/borg/legacy/repository.py821 # However, this only happens if the crash also affects the FS to the effect that file deletions
LOWsrc/borg/legacy/repository.py841 # Now we crash. But only segment 2 gets deleted, while segment 1 is still around. Now key 1
LOWsrc/borg/helpers/process.py321 # (non-matching) libraries from there.
AI Slop Vocabulary10 hits · 18 pts
SeverityFileLineSnippet
LOWsrc/borg/archive.py849 # we just use the existing one and do not remove it.
LOWsrc/borg/archive.py1925 # collecting any key we encounter in a damaged repo seems unwise, thus we just use
MEDIUMsrc/borg/archive.py1696 """A restartable/robust version of the streaming msgpack unpacker"""
LOWsrc/borg/testsuite/repoobj_test.py84 # Here, we just use len_data. For Borg transfer, we also know the size from another metadata source.
MEDIUMsrc/borg/testsuite/platform/linux_test.py85 # Testing non-ASCII ACL processing to see whether our code is robust.
LOWsrc/borg/testsuite/archiver/extract_cmd_test.py814 # we should just use the existing directory and not remove/recreate it.
MEDIUMsrc/borg/testsuite/archiver/benchmark_cmd_test.py21 # Filter for JSON lines only; the test harness merges stdout and stderr,
MEDIUMsrc/borg/helpers/fs.py76 # 2. Prefer HOME, but be robust against mount helpers that set HOME to root's home for non-root users.
LOWsrc/borg/helpers/fs.py598 fname, parent_fd = path, None # just use the path
LOWsrc/borg/helpers/fs.py643 fname, parent_fd = path, None # just use the path
Redundant / Tautological Comments7 hits · 11 pts
SeverityFileLineSnippet
LOWsrc/borg/fuse.py340 # Check if this is an archive we need to load
LOWsrc/borg/testsuite/shell_completions_test.py14 # Check if Fish is available
LOWsrc/borg/archiver/completion_cmd.py100 # Check if completing aid: prefix
LOWsrc/borg/archiver/completion_cmd.py369 # Check if completing aid: prefix
LOWsrc/borg/archiver/transfer_cmd.py58 # Check if the chunk is already in the repository
LOWsrc/borg/archiver/list_cmd.py38 # Check if the item matches the patterns/paths.
LOWsrc/borg/archiver/__init__.py468 # Open the file early, before running the main program, to avoid
Slop Phrases3 hits · 6 pts
SeverityFileLineSnippet
MEDIUMsrc/borg/constants.py177 # if you still need to, you can use "borg key migrate-to-repokey" with borg 1.0, 1.1 and 1.2.
LOWsrc/borg/archiver/create_cmd.py419 # we better do a fresh stat on the file, just to make sure to get the current file
LOWsrc/borg/legacy/upgrade.py62 # make sure we only have desired stuff in the new item. specifically, make sure to get rid of:
Fake / Example Data4 hits · 3 pts
SeverityFileLineSnippet
LOWsrc/borg/testsuite/repository_test.py241 assert remote_repository.ssh_cmd(Location("ssh://user@example.com/foo")) == ["ssh", "user@example.com"]
LOWsrc/borg/testsuite/repository_test.py246 "user@example.com",
LOWsrc/borg/testsuite/legacyrepository_test.py966 assert remote_repository.ssh_cmd(Location("ssh://user@example.com/foo")) == ["ssh", "user@example.com"]
LOWsrc/borg/testsuite/legacyrepository_test.py971 "user@example.com",