Update patch set 1
Patch Set 1: (2 comments) Generally looks fine. Find a suggestion to simplify the code. Patch-set: 1
This commit is contained in:
parent
00b69f1d27
commit
22d8c5e7f1
|
@ -0,0 +1,44 @@
|
|||
{
|
||||
"comments": [
|
||||
{
|
||||
"key": {
|
||||
"uuid": "7339866e_b6a2ceb8",
|
||||
"filename": "tools/zanata/zanata_stats.py",
|
||||
"patchSetId": 1
|
||||
},
|
||||
"lineNbr": 177,
|
||||
"author": {
|
||||
"id": 841
|
||||
},
|
||||
"writtenOn": "2021-03-04T03:00:04Z",
|
||||
"side": 1,
|
||||
"message": "Consider:\n\n my_project[version] \u003d {\n \u0027translation-stats\u0027: collections.defaultdict(int),\n \u0027review-stats\u0027: collectios.defaultdict(int),\n }",
|
||||
"range": {
|
||||
"startLine": 175,
|
||||
"startChar": 16,
|
||||
"endLine": 177,
|
||||
"endChar": 56
|
||||
},
|
||||
"revId": "31326e7cca2076d26e44c46ceed7975a0434f2c5",
|
||||
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
|
||||
"unresolved": true
|
||||
},
|
||||
{
|
||||
"key": {
|
||||
"uuid": "ed8e964c_4f4b9557",
|
||||
"filename": "tools/zanata/zanata_stats.py",
|
||||
"patchSetId": 1
|
||||
},
|
||||
"lineNbr": 188,
|
||||
"author": {
|
||||
"id": 841
|
||||
},
|
||||
"writtenOn": "2021-03-04T03:00:04Z",
|
||||
"side": 1,
|
||||
"message": "If we initialize \u0027translation-stats\u0027 and \u0027review-stats\u0027 with defaultdict(int) as my comment above,\nit would be:\n\n if stat_state in self.trans_fields:\n my_trans_stats \u003d my_version[\u0027translation-stats\u0027]\n my_trans_stats[stat_state] +\u003d word_count\n my_trans_stats[\u0027total\u0027] +\u003d word_count",
|
||||
"revId": "31326e7cca2076d26e44c46ceed7975a0434f2c5",
|
||||
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
|
||||
"unresolved": true
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue