mirror of
https://github.com/status-im/PyGithub.git
synced 2026-08-31 10:51:14 +00:00
Make generated code closer to correct code
This commit is contained in:
@@ -456,7 +456,10 @@
|
||||
"parameter": { "name": "id", "type": "integer" },
|
||||
"url": [
|
||||
{ "type": "constant", "value": "https://api.github.com/gists/comments/" },
|
||||
{ "type": "argument", "value": [ "id" ] }
|
||||
{
|
||||
"type": "stringOf",
|
||||
"value": [ { "type": "argument", "value": [ "id" ] } ]
|
||||
}
|
||||
]
|
||||
},
|
||||
"createElement": {
|
||||
@@ -739,7 +742,12 @@
|
||||
},
|
||||
{ "type": "constant", "value": "/comments" },
|
||||
{ "type": "constant", "value": "/" },
|
||||
{ "type": "argument", "value": [ "id" ] }
|
||||
{
|
||||
"type": "stringOf",
|
||||
"value": [
|
||||
{ "type": "argument", "value": [ "id" ] }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
@@ -1109,7 +1117,10 @@
|
||||
"parameter": { "name": "id", "type": "integer" },
|
||||
"url" : [
|
||||
{ "type": "constant", "value": "https://api.github.com/teams/" },
|
||||
{ "type": "argument", "value": [ "id" ] }
|
||||
{
|
||||
"type": "stringOf",
|
||||
"value": [ { "type": "argument", "value": [ "id" ] } ]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1211,8 +1222,13 @@
|
||||
]
|
||||
},
|
||||
{ "type": "constant", "value": "/comments" },
|
||||
{ "type": "constant", "value": "/" },
|
||||
{ "type": "argument", "value": [ "id" ] }
|
||||
{ "type": "constant", "value": "/" },
|
||||
{
|
||||
"type": "stringOf",
|
||||
"value": [
|
||||
{ "type": "argument", "value": [ "id" ] }
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -362,9 +362,14 @@
|
||||
"value": "https://api.github.com/authorizations/"
|
||||
},
|
||||
{
|
||||
"type": "argument",
|
||||
"type": "stringOf",
|
||||
"value": [
|
||||
"id"
|
||||
{
|
||||
"type": "argument",
|
||||
"value": [
|
||||
"id"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -520,9 +525,14 @@
|
||||
"value": "https://api.github.com/user/keys/"
|
||||
},
|
||||
{
|
||||
"type": "argument",
|
||||
"type": "stringOf",
|
||||
"value": [
|
||||
"id"
|
||||
{
|
||||
"type": "argument",
|
||||
"value": [
|
||||
"id"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -2697,9 +2707,14 @@
|
||||
"value": "https://api.github.com/gists/comments/"
|
||||
},
|
||||
{
|
||||
"type": "argument",
|
||||
"type": "stringOf",
|
||||
"value": [
|
||||
"id"
|
||||
{
|
||||
"type": "argument",
|
||||
"value": [
|
||||
"id"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -4068,9 +4083,14 @@
|
||||
"value": "/comments/"
|
||||
},
|
||||
{
|
||||
"type": "argument",
|
||||
"type": "stringOf",
|
||||
"value": [
|
||||
"id"
|
||||
{
|
||||
"type": "argument",
|
||||
"value": [
|
||||
"id"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -6412,9 +6432,14 @@
|
||||
"value": "https://api.github.com/teams/"
|
||||
},
|
||||
{
|
||||
"type": "argument",
|
||||
"type": "stringOf",
|
||||
"value": [
|
||||
"id"
|
||||
{
|
||||
"type": "argument",
|
||||
"value": [
|
||||
"id"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -6967,9 +6992,14 @@
|
||||
"value": "/comments/"
|
||||
},
|
||||
{
|
||||
"type": "argument",
|
||||
"type": "stringOf",
|
||||
"value": [
|
||||
"id"
|
||||
{
|
||||
"type": "argument",
|
||||
"value": [
|
||||
"id"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -7968,9 +7998,14 @@
|
||||
"value": "/comments/"
|
||||
},
|
||||
{
|
||||
"type": "argument",
|
||||
"type": "stringOf",
|
||||
"value": [
|
||||
"id"
|
||||
{
|
||||
"type": "argument",
|
||||
"value": [
|
||||
"id"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -8236,9 +8271,14 @@
|
||||
"value": "/downloads/"
|
||||
},
|
||||
{
|
||||
"type": "argument",
|
||||
"type": "stringOf",
|
||||
"value": [
|
||||
"id"
|
||||
{
|
||||
"type": "argument",
|
||||
"value": [
|
||||
"id"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -9007,9 +9047,14 @@
|
||||
"value": "/hooks/"
|
||||
},
|
||||
{
|
||||
"type": "argument",
|
||||
"type": "stringOf",
|
||||
"value": [
|
||||
"id"
|
||||
{
|
||||
"type": "argument",
|
||||
"value": [
|
||||
"id"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -9158,9 +9203,14 @@
|
||||
"value": "/issues/"
|
||||
},
|
||||
{
|
||||
"type": "argument",
|
||||
"type": "stringOf",
|
||||
"value": [
|
||||
"number"
|
||||
{
|
||||
"type": "argument",
|
||||
"value": [
|
||||
"number"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -9300,9 +9350,14 @@
|
||||
"value": "/issues/events/"
|
||||
},
|
||||
{
|
||||
"type": "argument",
|
||||
"type": "stringOf",
|
||||
"value": [
|
||||
"id"
|
||||
{
|
||||
"type": "argument",
|
||||
"value": [
|
||||
"id"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -9426,9 +9481,14 @@
|
||||
"value": "/keys/"
|
||||
},
|
||||
{
|
||||
"type": "argument",
|
||||
"type": "stringOf",
|
||||
"value": [
|
||||
"id"
|
||||
{
|
||||
"type": "argument",
|
||||
"value": [
|
||||
"id"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -9700,9 +9760,14 @@
|
||||
"value": "/milestones/"
|
||||
},
|
||||
{
|
||||
"type": "argument",
|
||||
"type": "stringOf",
|
||||
"value": [
|
||||
"number"
|
||||
{
|
||||
"type": "argument",
|
||||
"value": [
|
||||
"number"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
@@ -9875,9 +9940,14 @@
|
||||
"value": "/pulls/"
|
||||
},
|
||||
{
|
||||
"type": "argument",
|
||||
"type": "stringOf",
|
||||
"value": [
|
||||
"number"
|
||||
{
|
||||
"type": "argument",
|
||||
"value": [
|
||||
"number"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -210,9 +210,13 @@ class Collection:
|
||||
if "url" in desc[ "getElement" ]:
|
||||
urlForGetElement = desc[ "getElement" ][ "url" ]
|
||||
else:
|
||||
if desc[ "getElement" ][ "parameter" ][ "type" ] == "string":
|
||||
partForArgument = { "type": "argument", "value": [ desc[ "getElement" ][ "parameter" ][ "name" ] ] }
|
||||
else:
|
||||
partForArgument = { "type": "stringOf", "value": [ { "type": "argument", "value": [ desc[ "getElement" ][ "parameter" ][ "name" ] ] } ] }
|
||||
urlForGetElement = self.__url + [
|
||||
{ "type": "constant", "value": "/" },
|
||||
{ "type": "argument", "value": [ desc[ "getElement" ][ "parameter" ][ "name" ] ] },
|
||||
partForArgument,
|
||||
]
|
||||
|
||||
self.methods.append( Function(
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
str( {% include "GithubObject.Concatenation.py" with concatenation=value only %} )
|
||||
Reference in New Issue
Block a user