@@ -70,7 +70,9 @@ export interface HFCacheInfo {
7070}
7171
7272export async function scanCacheDir ( cacheDir : string | undefined = undefined ) : Promise < HFCacheInfo > {
73- if ( ! cacheDir ) cacheDir = getHFHubCachePath ( ) ;
73+ if ( ! cacheDir ) {
74+ cacheDir = getHFHubCachePath ( ) ;
75+ }
7476
7577 const s = await stat ( cacheDir ) ;
7678 if ( ! s . isDirectory ( ) ) {
@@ -85,7 +87,9 @@ export async function scanCacheDir(cacheDir: string | undefined = undefined): Pr
8587 const directories = await readdir ( cacheDir ) ;
8688 for ( const repo of directories ) {
8789 // skip .locks folder
88- if ( repo === ".locks" ) continue ;
90+ if ( repo === ".locks" ) {
91+ continue ;
92+ }
8993
9094 // get the absolute path of the repo
9195 const absolute = join ( cacheDir , repo ) ;
@@ -144,7 +148,9 @@ export async function scanCachedRepo(repoPath: string): Promise<CachedRepoInfo>
144148
145149 const snapshotDirs = await readdir ( snapshotsPath ) ;
146150 for ( const dir of snapshotDirs ) {
147- if ( FILES_TO_IGNORE . includes ( dir ) ) continue ; // Ignore unwanted files
151+ if ( FILES_TO_IGNORE . includes ( dir ) ) {
152+ continue ;
153+ } // Ignore unwanted files
148154
149155 const revisionPath = join ( snapshotsPath , dir ) ;
150156 const revisionStat = await stat ( revisionPath ) ;
@@ -205,7 +211,9 @@ export async function scanRefsDir(refsPath: string, refsByHash: Map<string, stri
205211 const refFiles = await readdir ( refsPath , { withFileTypes : true } ) ;
206212 for ( const refFile of refFiles ) {
207213 const refFilePath = join ( refsPath , refFile . name ) ;
208- if ( refFile . isDirectory ( ) ) continue ; // Skip directories
214+ if ( refFile . isDirectory ( ) ) {
215+ continue ;
216+ } // Skip directories
209217
210218 const commitHash = await readFile ( refFilePath , "utf-8" ) ;
211219 const refName = refFile . name ;
@@ -223,7 +231,9 @@ export async function scanSnapshotDir(
223231) : Promise < void > {
224232 const files = await readdir ( revisionPath , { withFileTypes : true } ) ;
225233 for ( const file of files ) {
226- if ( file . isDirectory ( ) ) continue ; // Skip directories
234+ if ( file . isDirectory ( ) ) {
235+ continue ;
236+ } // Skip directories
227237
228238 const filePath = join ( revisionPath , file . name ) ;
229239 const blobPath = await realpath ( filePath ) ;
0 commit comments