Skip to content

Commit 4293dd6

Browse files
committed
Fix some mypy types
1 parent c0a9c88 commit 4293dd6

File tree

3 files changed

+3
-20
lines changed

3 files changed

+3
-20
lines changed

.vscode/settings.json

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,4 @@
11
{
2-
"pgsql.connections": [
3-
{
4-
"id": "92CC1089-BAD0-44A4-B071-A50A6EC12B67",
5-
"groupId": "F3347CD6-9995-4EE9-8D98-D88DB010FA5B",
6-
"authenticationType": "SqlLogin",
7-
"connectTimeout": 15,
8-
"applicationName": "vscode-pgsql",
9-
"clientEncoding": "utf8",
10-
"sslmode": "prefer",
11-
"server": "localhost",
12-
"user": "admin",
13-
"password": "",
14-
"savePassword": true,
15-
"database": "postgres",
16-
"profileName": "local-pg",
17-
"expiresOn": 0
18-
}
19-
],
202
"python.testing.pytestArgs": [
213
"tests"
224
],

convert_csv_json.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import ast
22
import csv
33
import json
4+
from typing import Any
45

56
# Read CSV file - Using the correct dialect to handle quotes properly
67
with open("pittsburgh_restaurants.csv", encoding="utf-8") as csv_file:
@@ -15,7 +16,7 @@
1516
item = {}
1617
for i in range(len(header)):
1718
if i < len(row): # Ensure we don't go out of bounds
18-
value = row[i].strip()
19+
value: Any = row[i].strip()
1920
# Check if the value looks like a JSON array
2021
if value.startswith("[") and value.endswith("]"):
2122
try:

tests/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class TestData(ItemPublic):
1010
name="Balvanera",
1111
cuisine="Argentine, Wine Bars, Steakhouses",
1212
rating=4.5,
13-
price_level=2.0,
13+
price_level=2,
1414
review_count=132,
1515
description="Balvanera is an Argentine restaurant that also serves as a wine bar and steakhouse.",
1616
menu_summary="The cuisine is Argentine, likely featuring grilled meats and steaks, along with a selection of wines.", # noqa: E501

0 commit comments

Comments
 (0)