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

@ -8,12 +8,15 @@ import CacheDistributor from './cache-distributor';
import {logWarning} from '../utils';
class PoetryCache extends CacheDistributor {
protected readonly packageManager = 'poetry';
constructor(
private pythonVersion: string,
protected cacheDependencyPath: string = '**/poetry.lock',
protected readonly cacheDependencyPath: string = '**/poetry.lock',
protected poetryProjects: Set<string> = new Set<string>()
) {
super('poetry', cacheDependencyPath);
super();
}
protected async getCacheGlobalDirectories() {