@@ -248,7 +248,7 @@ def write(
248
248
# Make sure we have our entries read before getting a write lock.
249
249
# Otherwise it would be done when streaming.
250
250
# This can happen if one doesn't change the index, but writes it right away.
251
- self .entries
251
+ self .entries # noqa: B018
252
252
lfd = LockedFD (file_path or self ._file_path )
253
253
stream = lfd .open (write = True , stream = True )
254
254
@@ -397,7 +397,7 @@ def from_tree(cls, repo: "Repo", *treeish: Treeish, **kwargs: Any) -> "IndexFile
397
397
with TemporaryFileSwap (join_path_native (repo .git_dir , "index" )):
398
398
repo .git .read_tree (* arg_list , ** kwargs )
399
399
index = cls (repo , tmp_index )
400
- index .entries # Force it to read the file as we will delete the temp-file.
400
+ index .entries # noqa: B018 # Force it to read the file as we will delete the temp-file.
401
401
return index
402
402
# END index merge handling
403
403
@@ -1339,7 +1339,7 @@ def handle_stderr(proc: "Popen[bytes]", iter_checked_out_files: Iterable[PathLik
1339
1339
# Make sure we have our entries loaded before we start checkout_index, which
1340
1340
# will hold a lock on it. We try to get the lock as well during our entries
1341
1341
# initialization.
1342
- self .entries
1342
+ self .entries # noqa: B018
1343
1343
1344
1344
args .append ("--stdin" )
1345
1345
kwargs ["as_process" ] = True
@@ -1379,7 +1379,7 @@ def handle_stderr(proc: "Popen[bytes]", iter_checked_out_files: Iterable[PathLik
1379
1379
self ._flush_stdin_and_wait (proc , ignore_stdout = True )
1380
1380
except GitCommandError :
1381
1381
# Without parsing stdout we don't know what failed.
1382
- raise CheckoutError (
1382
+ raise CheckoutError ( # noqa: B904
1383
1383
"Some files could not be checked out from the index, probably because they didn't exist." ,
1384
1384
failed_files ,
1385
1385
[],
0 commit comments