7efe1aeea3
Patch Set 4: (2 comments) Patch-set: 4 Label: Verified=0
90 lines
2.9 KiB
Plaintext
90 lines
2.9 KiB
Plaintext
{
|
|
"comments": [
|
|
{
|
|
"key": {
|
|
"uuid": "7aa08908_b23adc32",
|
|
"filename": "giftwrap/builders/__init__.py",
|
|
"patchSetId": 4
|
|
},
|
|
"lineNbr": 41,
|
|
"author": {
|
|
"id": 6530
|
|
},
|
|
"writtenOn": "2016-06-15T16:46:54Z",
|
|
"side": 1,
|
|
"message": "This should be _constraints.",
|
|
"revId": "75f97871c9b43531a70187d725c8800779a9c292",
|
|
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
|
|
"unresolved": false
|
|
},
|
|
{
|
|
"key": {
|
|
"uuid": "7aa08908_129e5063",
|
|
"filename": "giftwrap/builders/__init__.py",
|
|
"patchSetId": 4
|
|
},
|
|
"lineNbr": 79,
|
|
"author": {
|
|
"id": 6530
|
|
},
|
|
"writtenOn": "2016-06-15T16:46:54Z",
|
|
"side": 1,
|
|
"message": "A better way to do this is to use enumerate in the for loop.",
|
|
"revId": "75f97871c9b43531a70187d725c8800779a9c292",
|
|
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
|
|
"unresolved": false
|
|
},
|
|
{
|
|
"key": {
|
|
"uuid": "7aa08908_3bbfe761",
|
|
"filename": "giftwrap/settings.py",
|
|
"patchSetId": 4
|
|
},
|
|
"lineNbr": 34,
|
|
"author": {
|
|
"id": 22252
|
|
},
|
|
"writtenOn": "2016-06-15T17:54:23Z",
|
|
"side": 1,
|
|
"message": "I didn\u0027t catch this before but we should not use a mutable object as the default value of a kwarg, it will not act as you might expect. It should instead default to None, and we set the default value to a list if it\u0027s not None.\n\nSo: constraints\u003dNone here, below: \nif constraints is None:\n self.constraints \u003d []\nelse:\n self.constraints \u003d constraints\n\nOtherwise, multiple instances of the class can mutate the same list in memory - probably not what we want.\n\nhttp://docs.python-guide.org/en/latest/writing/gotchas/",
|
|
"revId": "75f97871c9b43531a70187d725c8800779a9c292",
|
|
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
|
|
"unresolved": false
|
|
},
|
|
{
|
|
"key": {
|
|
"uuid": "7aa08908_52029873",
|
|
"filename": "giftwrap/settings.py",
|
|
"patchSetId": 4
|
|
},
|
|
"lineNbr": 47,
|
|
"author": {
|
|
"id": 6530
|
|
},
|
|
"writtenOn": "2016-06-15T16:46:54Z",
|
|
"side": 1,
|
|
"message": "What happens if constraints is not a list?",
|
|
"revId": "75f97871c9b43531a70187d725c8800779a9c292",
|
|
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
|
|
"unresolved": false
|
|
},
|
|
{
|
|
"key": {
|
|
"uuid": "7aa08908_db0a2327",
|
|
"filename": "giftwrap/settings.py",
|
|
"patchSetId": 4
|
|
},
|
|
"lineNbr": 47,
|
|
"author": {
|
|
"id": 22252
|
|
},
|
|
"writtenOn": "2016-06-15T17:54:23Z",
|
|
"side": 1,
|
|
"message": "Seems it\u0027s time to enforce a type and to raise a TypeError.",
|
|
"parentUuid": "7aa08908_52029873",
|
|
"revId": "75f97871c9b43531a70187d725c8800779a9c292",
|
|
"serverId": "4a232e18-c5a9-48ee-94c0-e04e7cca6543",
|
|
"unresolved": false
|
|
}
|
|
]
|
|
} |