Skip to content

Commit 2f2a2f9

Browse files
fix(firstMile): newlines for python code snippets (#4484)
1 parent e566d94 commit 2f2a2f9

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

src/homepageExperience/components/steps/python/ExecuteAggregateQuery.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ tables = query_api.query(query, org="${org.name}")
3636
3737
for table in tables:
3838
for record in table.records:
39-
print(record)`
39+
print(record)
40+
`
4041

4142
return (
4243
<>

src/homepageExperience/components/steps/python/ExecuteQuery.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ tables = query_api.query(query, org="${org.name}")
2828
2929
for table in tables:
3030
for record in table.records:
31-
print(record)`
31+
print(record)
32+
`
3233

3334
return (
3435
<>

src/homepageExperience/components/steps/python/InitalizeClient.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ token = os.environ.get("INFLUXDB_TOKEN")
2626
org = "${org.name}"
2727
url = "${url}"
2828
29-
client = influxdb_client.InfluxDBClient(url=url, token=token, org=org)`
29+
client = influxdb_client.InfluxDBClient(url=url, token=token, org=org)
30+
`
3031

3132
return (
3233
<>

src/homepageExperience/components/steps/python/WriteData.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,7 @@ export const WriteDataComponent = (props: OwnProps) => {
5050
onSelectBucket(bucket.name)
5151
}, [bucket])
5252

53-
const codeSnippet = `
54-
bucket="${bucket.name}"
53+
const codeSnippet = `bucket="${bucket.name}"
5554
5655
write_api = client.write_api(write_options=SYNCHRONOUS)
5756
@@ -62,7 +61,8 @@ for value in range(5):
6261
.field("field1", value)
6362
)
6463
write_api.write(bucket=bucket, org="${org.name}", record=point)
65-
time.sleep(1) # separate points by 1 second`
64+
time.sleep(1) # separate points by 1 second
65+
`
6666

6767
return (
6868
<>

0 commit comments

Comments
 (0)