@@ -248,7 +248,7 @@ def write(
248248# Make sure we have our entries read before getting a write lock.
249249# Otherwise it would be done when streaming.
250250# This can happen if one doesn't change the index, but writes it right away.
251- self .entries
251+ self .entries # noqa: B018
252252lfd = LockedFD (file_path or self ._file_path )
253253stream = lfd .open (write = True ,stream = True )
254254
@@ -397,7 +397,7 @@ def from_tree(cls, repo: "Repo", *treeish: Treeish, **kwargs: Any) -> "IndexFile
397397with TemporaryFileSwap (join_path_native (repo .git_dir ,"index" )):
398398repo .git .read_tree (* arg_list ,** kwargs )
399399index = 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.
401401return index
402402# END index merge handling
403403
@@ -1339,7 +1339,7 @@ def handle_stderr(proc: "Popen[bytes]", iter_checked_out_files: Iterable[PathLik
13391339# Make sure we have our entries loaded before we start checkout_index, which
13401340# will hold a lock on it. We try to get the lock as well during our entries
13411341# initialization.
1342- self .entries
1342+ self .entries # noqa: B018
13431343
13441344args .append ("--stdin" )
13451345kwargs ["as_process" ]= True
@@ -1379,7 +1379,7 @@ def handle_stderr(proc: "Popen[bytes]", iter_checked_out_files: Iterable[PathLik
13791379self ._flush_stdin_and_wait (proc ,ignore_stdout = True )
13801380except GitCommandError :
13811381# Without parsing stdout we don't know what failed.
1382- raise CheckoutError (
1382+ raise CheckoutError (# noqa: B904
13831383"Some files could not be checked out from the index, probably because they didn't exist." ,
13841384failed_files ,
13851385 [],