Readability improvement: Move CacheDistributor constructor params to readonly abstract fields of concrete cache implementations. Remove empty CacheDistributor constructor.

This commit is contained in:
Sam Pinkus 2025-01-08 16:09:52 +10:00
parent 1f3a570584
commit 0024ce0d14
4 changed files with 14 additions and 10 deletions

View file

@ -12,12 +12,13 @@ import {CACHE_DEPENDENCY_BACKUP_PATH} from './constants';
class PipCache extends CacheDistributor {
private cacheDependencyBackupPath: string = CACHE_DEPENDENCY_BACKUP_PATH;
protected readonly packageManager = 'pip';
constructor(
private pythonVersion: string,
cacheDependencyPath = '**/requirements.txt'
protected readonly cacheDependencyPath = '**/requirements.txt'
) {
super('pip', cacheDependencyPath);
super();
}
protected async getCacheGlobalDirectories() {