Skip to content

Commit 4fa2f07

Browse files
committed
add comment
Signed-off-by: ふぁ <yuki@yuki0311.com>
1 parent c5979b1 commit 4fa2f07

File tree

1 file changed

+20
-20
lines changed
  • twitter-openapi-typescript-generated/tools/win

1 file changed

+20
-20
lines changed

twitter-openapi-typescript-generated/tools/win/replace.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,32 @@
66
with open(file, mode="r", encoding="utf-8") as f:
77
text = f.read()
88

9+
# https://github.com/OpenAPITools/openapi-generator/pull/15668
910
text = text.replace("json['typename']", "json['__typename']")
1011
text = text.replace("json['typename']", "json['__typename']")
1112

1213
with open(file, mode="w", encoding="utf-8") as f:
1314
f.write(text)
1415

1516

16-
1717
with open(file, mode="r", encoding="utf-8") as f:
1818
text = f.read()
1919

2020

2121
with open("package.json", mode="r", encoding="utf-8") as f:
2222
package = json.load(f)
2323

24-
package.update({
25-
"author": "fa0311",
26-
"license": "LGPL-3.0-only",
27-
"repository": {
28-
"type": "git",
29-
"url": "https://github.com/fa0311/twitter-openapi-typescript.git"
30-
},
31-
"keywords": [
32-
"twitter",
33-
"api",
34-
"typescript"
35-
],
36-
})
24+
package.update(
25+
{
26+
"author": "fa0311",
27+
"license": "LGPL-3.0-only",
28+
"repository": {
29+
"type": "git",
30+
"url": "https://github.com/fa0311/twitter-openapi-typescript.git",
31+
},
32+
"keywords": ["twitter", "api", "typescript"],
33+
}
34+
)
3735

3836

3937
with open("package.json", mode="w", encoding="utf-8") as f:
@@ -42,12 +40,14 @@
4240

4341
with open("tsconfig.json", mode="r", encoding="utf-8") as f:
4442
package = json.load(f)
45-
package["compilerOptions"].update({
46-
"declaration": True,
47-
"declarationMap": True,
48-
"sourceMap": True,
49-
})
43+
package["compilerOptions"].update(
44+
{
45+
"declaration": True,
46+
"declarationMap": True,
47+
"sourceMap": True,
48+
}
49+
)
5050

5151

5252
with open("tsconfig.json", mode="w", encoding="utf-8") as f:
53-
json.dump(package, f, ensure_ascii=False, indent=2)
53+
json.dump(package, f, ensure_ascii=False, indent=2)

0 commit comments

Comments
 (0)