fix: cherry-pick conflict

This commit is contained in:
Bjarke Sporring
2026-01-15 15:20:32 +01:00
parent 988ce3bc92
commit 1c20a06c21
2 changed files with 32 additions and 34 deletions

View File

@@ -128,40 +128,29 @@ git add app.py
git commit -m "Add beta features framework" | Out-Null
# Commit 4: Performance bug fix (SHOULD be cherry-picked)
$appWithPerformance = @"
class App:
# This commit adds caching to the existing file to fix performance
# It should apply cleanly to main since it doesn't depend on experimental features
$performanceCode = @"
class DataCache:
def __init__(self):
self.version = '1.0.0'
self.experimental_mode = False
self.beta_features = []
self.cache = {}
def start(self):
print('App started')
if self.experimental_mode:
self.enable_experimental_features()
def enable_experimental_features(self):
print('Experimental features enabled')
def add_beta_feature(self, feature):
self.beta_features.append(feature)
def get_data(self, key):
def get(self, key):
# Use cache to improve performance
if key in self.cache:
return self.cache[key]
data = self.fetch_data(key)
self.cache[key] = data
return data
return None
def fetch_data(self, key):
# Simulate data fetching
return {'key': key, 'value': 'data'}
def set(self, key, value):
self.cache[key] = value
def clear(self):
self.cache.clear()
"@
Set-Content -Path "app.py" -Value $appWithPerformance
git add app.py
Set-Content -Path "cache.py" -Value $performanceCode
git add cache.py
git commit -m "Fix performance issue with data caching" | Out-Null
# Return to module directory