Skip to content

Commit 30f716d

Browse files
fix buggy branch diff
1 parent 082abc5 commit 30f716d

1 file changed

Lines changed: 11 additions & 20 deletions

File tree

internal/buggy-branch-diff.diff

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
--- server.py 2026-01-06 20:27:13
2-
+++ server.py 2026-01-06 20:32:16
3-
@@ -6,6 +6,10 @@
1+
diff --git c/server.py w/server.py
2+
index 06d208d..6304e07 100644
3+
--- c/server.py
4+
+++ w/server.py
5+
@@ -7,6 +7,10 @@ app = Flask(__name__)
46
PORT = 3000
57

68

@@ -11,7 +13,7 @@
1113
@app.route('/api/weather-activity', methods=['GET'])
1214
def weather_activity():
1315
"""Get location from IP, weather, and activity recommendations"""
14-
@@ -29,6 +33,8 @@
16+
@@ -30,6 +34,8 @@ def weather_activity():
1517
weather_response.raise_for_status()
1618
weather = weather_response.json()['current_weather']
1719

@@ -20,7 +22,7 @@
2022
# Business logic: Recommend activity based on weather
2123
recommended_activity = 'Play a board game'
2224
if weather['temperature'] > 40:
23-
@@ -95,31 +101,18 @@
25+
@@ -96,20 +102,18 @@ def create_user():
2426
return jsonify({'error': 'Failed to create user'}), 500
2527

2628

@@ -34,22 +36,11 @@
3436
def get_post(post_id):
3537
"""Get post with comments"""
3638
try:
37-
- # Fetch post and comments in parallel using requests
38-
- import concurrent.futures
39+
- post_response = requests.get(f'https://jsonplaceholder.typicode.com/posts/{post_id}')
40+
- post_response.raise_for_status()
3941
-
40-
- with concurrent.futures.ThreadPoolExecutor(max_workers=2) as executor:
41-
- post_future = executor.submit(
42-
- requests.get, f'https://jsonplaceholder.typicode.com/posts/{post_id}'
43-
- )
44-
- comments_future = executor.submit(
45-
- requests.get, f'https://jsonplaceholder.typicode.com/posts/{post_id}/comments'
46-
- )
47-
-
48-
- post_response = post_future.result()
49-
- comments_response = comments_future.result()
50-
-
51-
- post_response.raise_for_status()
52-
- comments_response.raise_for_status()
42+
- comments_response = requests.get(f'https://jsonplaceholder.typicode.com/posts/{post_id}/comments')
43+
- comments_response.raise_for_status()
5344
-
5445
- return jsonify({
5546
- 'post': post_response.json(),

0 commit comments

Comments
 (0)