Search is not available for this dataset
id int64 0 10.8M | vector listlengths 1.54k 1.54k | ast_depth int64 3 164 | ast_data stringlengths 297 510k | full_path stringlengths 0 319 | code stringlengths 60 56.5k |
|---|---|---|---|---|---|
9,701 | [
0.024932773783802986,
-0.002519708825275302,
0.03143899515271187,
0.00017127847240772098,
-0.017369288951158524,
0.00278983311727643,
-0.018101239576935768,
0.023643147200345993,
0.03696928545832634,
0.05121326446533203,
0.022597504779696465,
-0.001616389607079327,
-0.010107881389558315,
-... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "initialize_arguments", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_arguments", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "bar", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "bar", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_arguments", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_init_arguments", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_init_arguments(self):
self.initialize_arguments()
definition = InputDefinition()
self.assertEqual([], definition.get_arguments())
definition = InputDefinition([self.foo, self.bar])
self.assertEqual(
[self.foo, self.bar],
definition.get_arguments()
) | |
9,702 | [
0.012611307203769684,
-0.01718565635383129,
0.017590979114174843,
-0.008969198912382126,
0.0009488879586569965,
0.009860907681286335,
-0.019270170480012894,
0.006653072778135538,
0.05151064693927765,
0.03810027614235878,
0.03592311963438988,
-0.004467228427529335,
-0.005092582665383816,
-0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "initialize_arguments", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "set_arguments", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_arguments", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "bar", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "set_arguments", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "bar", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_arguments", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_set_arguments", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_set_arguments(self):
self.initialize_arguments()
definition = InputDefinition()
definition.set_arguments([self.foo])
self.assertEqual([self.foo], definition.get_arguments())
definition.set_arguments([self.bar])
self.assertEqual([self.bar], definition.get_arguments()) | |
9,703 | [
0.021009663119912148,
0.0019004467176273465,
0.05128512531518936,
-0.003956520464271307,
-0.022134967148303986,
-0.014736692421138287,
0.01635281927883625,
-0.014197982847690582,
0.01844780147075653,
0.03476470708847046,
0.02439754642546177,
0.007116948254406452,
-0.04221086576581001,
0.00... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "initialize_options", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_options", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "bar", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "bar", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_options", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_init_options", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_init_options(self):
self.initialize_options()
definition = InputDefinition()
self.assertEqual([], definition.get_options())
definition = InputDefinition([self.foo, self.bar])
self.assertEqual(
[self.foo, self.bar],
definition.get_options()
) | |
9,704 | [
0.022749610245227814,
-0.005399324465543032,
0.025715958327054977,
-0.008117526769638062,
-0.0014945832081139088,
0.006605829577893019,
-0.03212783485651016,
0.013405612669885159,
0.041620150208473206,
0.04492877051234245,
0.015470648184418678,
-0.001075301319360733,
-0.011831166222691536,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "initialize_arguments", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_arguments", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_arguments", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "bar", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_arguments", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "bar", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_arguments", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_add_arguments", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_add_arguments(self):
self.initialize_arguments()
definition = InputDefinition()
definition.add_arguments([self.foo])
self.assertEqual([self.foo], definition.get_arguments())
definition.add_arguments([self.bar])
self.assertEqual([self.foo, self.bar], definition.get_arguments()) | |
9,705 | [
0.025793971493840218,
-0.006574826315045357,
-0.0020762609783560038,
0.007662391290068626,
-0.0012894239043816924,
0.014566782861948013,
-0.02592579647898674,
0.007426202762871981,
0.05207130312919617,
0.039811477065086365,
0.02561820298433304,
0.005976115819066763,
-0.007876608520746231,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "initialize_arguments", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_argument", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_arguments", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "bar", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_argument", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "bar", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_arguments", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_add_argument", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_add_argument(self):
self.initialize_arguments()
definition = InputDefinition()
definition.add_argument(self.foo)
self.assertEqual([self.foo], definition.get_arguments())
definition.add_argument(self.bar)
self.assertEqual([self.foo, self.bar], definition.get_arguments()) | |
9,706 | [
0.05353805050253868,
0.00953085906803608,
0.008079099468886852,
-0.0036618562880903482,
-0.0006923151086084545,
0.024668104946613312,
-0.02995581366121769,
-0.007536164950579405,
0.05065813660621643,
0.028515856713056564,
0.03545597568154335,
-0.015497235581278801,
0.04565369710326195,
0.0... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "initialize_arguments", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_argument", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "Exception", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "An argument with name \"foo\" already exists."}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_argument", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo1", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertRaisesRegexp", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_arguments_must_have_different_names", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_arguments_must_have_different_names(self):
self.initialize_arguments()
definition = InputDefinition()
definition.add_argument(self.foo)
self.assertRaisesRegexp(
Exception,
'An argument with name "foo" already exists.',
definition.add_argument,
self.foo1
) | |
9,707 | [
0.030090998858213425,
0.018191376700997353,
-0.005707342643290758,
-0.008480191230773926,
-0.009226248599588871,
0.01969592645764351,
-0.06008252501487732,
0.011769062839448452,
0.04113265499472618,
0.05804330110549927,
0.027231112122535706,
0.007410841062664986,
0.01839032582938671,
-0.01... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "initialize_arguments", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foolist"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "IS_LIST", "value": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_argument", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "Exception", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Cannot add an argument after a list argument."}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_argument", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "anotherbar"}}], "func": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertRaisesRegexp", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_list_argument_has_to_be_last", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_list_argument_has_to_be_last(self):
self.initialize_arguments()
definition = InputDefinition()
definition.add_argument(InputArgument('foolist', InputArgument.IS_LIST))
self.assertRaisesRegexp(
Exception,
'Cannot add an argument after a list argument.',
definition.add_argument,
InputArgument('anotherbar')
) | |
9,708 | [
0.05560985207557678,
0.023799525573849678,
-0.00363571522757411,
0.0064156255684792995,
-0.000069042929681018,
0.03160073980689049,
-0.0361650325357914,
0.04282517358660698,
0.0481579452753067,
0.05160445347428322,
0.03188018873333931,
-0.012155922129750252,
-0.01471751555800438,
0.0088374... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "initialize_arguments", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_argument", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "Exception", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Cannot add a required argument after an optional one."}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_argument", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo2", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertRaisesRegexp", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_required_argument_cannot_follow_an_optional_one", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_required_argument_cannot_follow_an_optional_one(self):
self.initialize_arguments()
definition = InputDefinition()
definition.add_argument(self.foo)
self.assertRaisesRegexp(
Exception,
'Cannot add a required argument after an optional one.',
definition.add_argument,
self.foo2
) | |
9,709 | [
0.02135767787694931,
0.011523265391588211,
0.011586453765630722,
0.0007776481215842068,
0.002460039220750332,
-0.004506481345742941,
-0.047609586268663406,
0.014935439452528954,
0.03747646510601044,
0.01873823255300522,
0.02913559600710869,
-0.005666850134730339,
0.009759735316038132,
0.01... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "initialize_arguments", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_arguments", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "Exception", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "The \"bar\" argument does not exist."}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_argument", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "bar"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertRaises", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_get_invalid_argument", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_get_invalid_argument(self):
self.initialize_arguments()
definition = InputDefinition()
definition.add_arguments([self.foo])
self.assertRaises(
Exception,
'The "bar" argument does not exist.',
definition.get_argument,
'bar'
) | |
9,710 | [
0.012264956720173359,
0.00634452048689127,
0.0040036882273852825,
0.010451439768075943,
0.017476726323366165,
0.02235369198024273,
-0.03176166117191315,
0.0003829311463050544,
0.05838967487215996,
0.027944905683398247,
0.054059553891420364,
-0.014151014387607574,
0.02394958771765232,
-0.00... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "initialize_arguments", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_arguments", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "has_argument", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertTrue", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "bar"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "has_argument", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertFalse", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_has_argument", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_has_argument(self):
self.initialize_arguments()
definition = InputDefinition()
definition.add_arguments([self.foo])
self.assertTrue(definition.has_argument('foo'))
self.assertFalse(definition.has_argument('bar')) | |
9,711 | [
0.022623954340815544,
0.013085014186799526,
0.01560272742062807,
-0.008368735201656818,
0.004178457893431187,
0.039172302931547165,
-0.03364042565226555,
0.006719810888171196,
0.037257421761751175,
0.06723356992006302,
0.06264731287956238,
0.0022015213035047054,
-0.0023064259439706802,
-0.... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "initialize_arguments", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo2", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_argument", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 1}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_argument_required_count", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_argument", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 1}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_argument_required_count", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_get_argument_required_count", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_get_argument_required_count(self):
self.initialize_arguments()
definition = InputDefinition()
definition.add_argument(self.foo2)
self.assertEqual(1, definition.get_argument_required_count())
definition.add_argument(self.foo)
self.assertEqual(1, definition.get_argument_required_count()) | |
9,712 | [
-0.007475167512893677,
-0.022495146840810776,
0.004271524492651224,
-0.012373492121696472,
0.0035286506172269583,
-0.0016874262364581227,
-0.018676310777664185,
-0.01387084648013115,
0.06240139901638031,
0.018003081902861595,
0.008072949014604092,
-0.010110048577189445,
0.027416685596108437,... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo1"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "OPTIONAL", "value": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo2"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "OPTIONAL", "value": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": ""}}, {"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "func": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo3"}}, {"_type": "BinOp", "_fields": {"op": {"_type": "BitOr", "_fields": {}}, "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "OPTIONAL", "value": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}}}, "right": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "IS_LIST", "value": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo1"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "foo2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "foo3"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "Constant", "_fields": {"kind": null, "value": "default"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}]}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_argument_defaults", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo4"}}, {"_type": "BinOp", "_fields": {"op": {"_type": "BitOr", "_fields": {}}, "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "OPTIONAL", "value": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}}}, "right": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "IS_LIST", "value": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": ""}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 1}}, {"_type": "Constant", "_fields": {"kind": null, "value": 2}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo4"}}], "values": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 1}}, {"_type": "Constant", "_fields": {"kind": null, "value": 2}}]}}]}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_argument_defaults", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_get_argument_default", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_get_argument_default(self):
definition = InputDefinition([
InputArgument('foo1', InputArgument.OPTIONAL),
InputArgument('foo2', InputArgument.OPTIONAL, '', 'default'),
InputArgument('foo3', InputArgument.OPTIONAL | InputArgument.IS_LIST),
])
self.assertEqual(
{
'foo1': None,
'foo2': 'default',
'foo3': []
},
definition.get_argument_defaults()
)
definition = InputDefinition([
InputArgument('foo4', InputArgument.OPTIONAL | InputArgument.IS_LIST, '', [1, 2])
])
self.assertEqual({'foo4': [1, 2]}, definition.get_argument_defaults()) | |
9,713 | [
0.02359015867114067,
0.00671394681558013,
0.014010225422680378,
-0.0043589272536337376,
0.000762883631978184,
0.03427766636013985,
-0.019902056083083153,
0.002012471202760935,
0.04750002920627594,
0.0585985966026783,
0.06101927161216736,
-0.014672485180199146,
0.014558302238583565,
-0.0136... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "initialize_arguments", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo2", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_argument", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 1}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_argument_count", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_argument", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 2}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_argument_count", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_argument_count", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_argument_count(self):
self.initialize_arguments()
definition = InputDefinition()
definition.add_argument(self.foo2)
self.assertEqual(1, definition.get_argument_count())
definition.add_argument(self.foo)
self.assertEqual(2, definition.get_argument_count()) | |
9,714 | [
0.002543496200814843,
0.006017687730491161,
0.020639002323150635,
-0.041811563074588776,
-0.03029155544936657,
0.006157140713185072,
-0.006169266998767853,
0.009828384965658188,
0.05379236862063408,
0.02219117246568203,
0.04040490835905075,
0.0065118358470499516,
-0.028884902596473694,
0.0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "initialize_options", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "bar", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "set_options", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "Exception", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "The \"-f\" option does not exist."}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_option_for_shortcut", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "f"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertRaisesRegexp", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_set_options_clears_options", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_set_options_clears_options(self):
self.initialize_options()
definition = InputDefinition([self.foo])
definition.set_options([self.bar])
self.assertRaisesRegexp(
Exception,
'The "-f" option does not exist.',
definition.get_option_for_shortcut,
'f'
) | |
9,715 | [
0.021060490980744362,
0.0028186733834445477,
0.01748032122850418,
-0.009689189493656158,
-0.008382143452763557,
0.0018952167592942715,
0.006853467784821987,
-0.016366489231586456,
0.03718830272555351,
0.0205831341445446,
0.029823381453752518,
0.0032278355211019516,
-0.03684733435511589,
-0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "initialize_options", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_option", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_options", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "bar", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_option", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "bar", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_options", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_add_option", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_add_option(self):
self.initialize_options()
definition = InputDefinition()
definition.add_option(self.foo)
self.assertEqual([self.foo], definition.get_options())
definition.add_option(self.bar)
self.assertEqual([self.foo, self.bar], definition.get_options()) | |
9,716 | [
0.04038277268409729,
0.005634088069200516,
0.02464682050049305,
-0.024720871821045876,
-0.02900351956486702,
0.023881621658802032,
0.010521489195525646,
-0.011940810829401016,
0.017834078520536423,
0.002710595028474927,
0.020586328580975533,
-0.017525531351566315,
-0.002840185072273016,
0.... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "initialize_options", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_option", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "Exception", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "An option named \"foo\" already exists."}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_option", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo2", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertRaisesRegexp", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_add_duplicate_option", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_add_duplicate_option(self):
self.initialize_options()
definition = InputDefinition()
definition.add_option(self.foo)
self.assertRaisesRegexp(
Exception,
'An option named "foo" already exists.',
definition.add_option,
self.foo2
) | |
9,717 | [
0.027120549231767654,
-0.0006706160493195057,
0.033965013921260834,
-0.033347468823194504,
-0.03674396872520447,
0.03236968815326691,
-0.0004233565414324403,
0.01466671098023653,
0.019517017528414726,
-0.0034704783465713263,
0.00889651756733656,
-0.01744566671550274,
-0.0008282188791781664,
... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "initialize_options", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_option", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "Exception", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "An option with shortcut \"f\" already exists."}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_option", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo1", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertRaisesRegexp", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_add_duplicate_shortcut_option", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_add_duplicate_shortcut_option(self):
self.initialize_options()
definition = InputDefinition()
definition.add_option(self.foo)
self.assertRaisesRegexp(
Exception,
'An option with shortcut "f" already exists.',
definition.add_option,
self.foo1
) | |
9,718 | [
0.015321898274123669,
0.03198866546154022,
0.020497241988778114,
-0.012217892333865166,
-0.03170047700405121,
0.0034192088060081005,
-0.01374888140708208,
-0.012680191546678543,
0.02569659985601902,
0.012776253744959831,
0.013664827682077885,
-0.0007666202145628631,
-0.007324731908738613,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "initialize_options", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "foo", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "Exception", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "The \"--bar\" option does not exist."}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_option", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "bar"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertRaisesRegexp", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_get_invalid_option", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_get_invalid_option(self):
self.initialize_options()
definition = InputDefinition([self.foo])
self.assertRaisesRegexp(
Exception,
'The "--bar" option does not exist.',
definition.get_option,
'bar'
) | |
9,719 | [
-0.014820011332631111,
-0.0028024238999933004,
0.05385540798306465,
-0.03418498858809471,
-0.022468261420726776,
-0.013427198864519596,
0.0020082765258848667,
-0.011166933923959732,
0.047599971294403076,
0.016897011548280716,
-0.0017914131749421358,
-0.026707787066698074,
-0.0009033426176756... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo1"}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VALUE_NONE", "value": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VALUE_REQUIRED", "value": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo3"}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VALUE_REQUIRED", "value": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": ""}}, {"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "func": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo4"}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VALUE_OPTIONAL", "value": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo5"}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VALUE_OPTIONAL", "value": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": ""}}, {"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "func": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo6"}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "BinOp", "_fields": {"op": {"_type": "BitOr", "_fields": {}}, "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VALUE_OPTIONAL", "value": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}}}, "right": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VALUE_IS_LIST", "value": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo7"}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "BinOp", "_fields": {"op": {"_type": "BitOr", "_fields": {}}, "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VALUE_OPTIONAL", "value": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}}}, "right": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VALUE_IS_LIST", "value": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": ""}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 1}}, {"_type": "Constant", "_fields": {"kind": null, "value": 2}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo1"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "foo2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "foo3"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "foo4"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "foo5"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "foo6"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "foo7"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": false}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "Constant", "_fields": {"kind": null, "value": "default"}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "Constant", "_fields": {"kind": null, "value": "default"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 1}}, {"_type": "Constant", "_fields": {"kind": null, "value": 2}}]}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "defaults", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "defaults", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_option_defaults", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_get_options_defaults", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_get_options_defaults(self):
definition = InputDefinition([
InputOption('foo1', None, InputOption.VALUE_NONE),
InputOption('foo2', None, InputOption.VALUE_REQUIRED),
InputOption('foo3', None, InputOption.VALUE_REQUIRED, '', 'default'),
InputOption('foo4', None, InputOption.VALUE_OPTIONAL),
InputOption('foo5', None, InputOption.VALUE_OPTIONAL, '', 'default'),
InputOption('foo6', None, InputOption.VALUE_OPTIONAL | InputOption.VALUE_IS_LIST),
InputOption('foo7', None, InputOption.VALUE_OPTIONAL | InputOption.VALUE_IS_LIST, '', [1, 2])
])
defaults = {
'foo1': False,
'foo2': None,
'foo3': 'default',
'foo4': None,
'foo5': 'default',
'foo6': [],
'foo7': [1, 2]
}
self.assertEqual(defaults, definition.get_option_defaults()) | |
9,720 | [
0.01113052386790514,
-0.014109650626778603,
0.0016670431941747665,
-0.05375105142593384,
-0.03818352892994881,
0.01743105985224247,
-0.003524243365973234,
-0.03405078500509262,
0.07139762490987778,
0.022273724898695946,
0.012404575943946838,
-0.02179199457168579,
0.011491822078824043,
0.00... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo"}}], "func": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "[--foo]"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_synopsis", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "f"}}], "func": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "[-f|--foo]"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_synopsis", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "f"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VALUE_REQUIRED", "value": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "[-f|--foo=\"...\"]"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_synopsis", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "f"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VALUE_OPTIONAL", "value": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "[-f|--foo[=\"...\"]]"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_synopsis", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo"}}], "func": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "[foo]"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_synopsis", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "REQUIRED", "value": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_synopsis", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "IS_LIST", "value": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "[foo1] ... [fooN]"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_synopsis", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo"}}, {"_type": "BinOp", "_fields": {"op": {"_type": "BitOr", "_fields": {}}, "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "REQUIRED", "value": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}}}, "right": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "IS_LIST", "value": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo1 ... [fooN]"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_synopsis", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_get_synopsis", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_get_synopsis(self):
definition = InputDefinition([InputOption('foo')])
self.assertEqual('[--foo]', definition.get_synopsis())
definition = InputDefinition([InputOption('foo', 'f')])
self.assertEqual('[-f|--foo]', definition.get_synopsis())
definition = InputDefinition([InputOption('foo', 'f', InputOption.VALUE_REQUIRED)])
self.assertEqual('[-f|--foo="..."]', definition.get_synopsis())
definition = InputDefinition([InputOption('foo', 'f', InputOption.VALUE_OPTIONAL)])
self.assertEqual('[-f|--foo[="..."]]', definition.get_synopsis())
definition = InputDefinition([InputArgument('foo')])
self.assertEqual('[foo]', definition.get_synopsis())
definition = InputDefinition([InputArgument('foo', InputArgument.REQUIRED)])
self.assertEqual('foo', definition.get_synopsis())
definition = InputDefinition([InputArgument('foo', InputArgument.IS_LIST)])
self.assertEqual('[foo1] ... [fooN]', definition.get_synopsis())
definition = InputDefinition([InputArgument('foo', InputArgument.REQUIRED | InputArgument.IS_LIST)])
self.assertEqual('foo1 ... [fooN]', definition.get_synopsis()) | |
9,721 | [
-0.004681693855673075,
-0.0040364800952374935,
0.00928234588354826,
-0.03291523829102516,
-0.006950850132852793,
-0.026905711740255356,
-0.032167162746191025,
-0.04658004641532898,
0.0640350952744484,
0.029997749254107475,
0.03730393573641777,
-0.025334758684039116,
0.025060463696718216,
0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "OPTIONAL", "value": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "The foo argument"}}], "func": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "baz"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "OPTIONAL", "value": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "The baz argument"}}, {"_type": "Constant", "_fields": {"kind": null, "value": true}}], "func": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "bar"}}, {"_type": "BinOp", "_fields": {"op": {"_type": "BitOr", "_fields": {}}, "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "OPTIONAL", "value": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}}}, "right": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "IS_LIST", "value": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "The bar argument"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "http://foo.com/"}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputArgument", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "f"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VALUE_REQUIRED", "value": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "The foo option"}}], "func": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "baz"}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VALUE_OPTIONAL", "value": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "The baz option"}}, {"_type": "Constant", "_fields": {"kind": null, "value": false}}], "func": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "bar"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "b"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VALUE_OPTIONAL", "value": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "The bar option"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "bar"}}], "func": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "qux"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ""}}, {"_type": "BinOp", "_fields": {"op": {"_type": "BitOr", "_fields": {}}, "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VALUE_OPTIONAL", "value": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}}}, "right": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VALUE_IS_LIST", "value": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "The qux option"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "http://foo.com/"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "bar"}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputOption", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}]}}], "func": {"_type": "Name", "_fields": {"id": "InputDefinition", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "definition_astext.txt"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "open_fixture", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "as_text", "value": {"_type": "Name", "_fields": {"id": "definition", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_as_text", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_as_text(self):
definition = InputDefinition([
InputArgument('foo', InputArgument.OPTIONAL, 'The foo argument'),
InputArgument('baz', InputArgument.OPTIONAL, 'The baz argument', True),
InputArgument('bar', InputArgument.OPTIONAL | InputArgument.IS_LIST,
'The bar argument', ['http://foo.com/']),
InputOption('foo', 'f', InputOption.VALUE_REQUIRED, 'The foo option'),
InputOption('baz', None, InputOption.VALUE_OPTIONAL, 'The baz option', False),
InputOption('bar', 'b', InputOption.VALUE_OPTIONAL, 'The bar option', 'bar'),
InputOption('qux', '', InputOption.VALUE_OPTIONAL | InputOption.VALUE_IS_LIST,
'The qux option', ['http://foo.com/', 'bar'])
])
self.assertEqual(
self.open_fixture('definition_astext.txt'),
definition.as_text()
) | |
9,722 | [
-0.015231969766318798,
-0.004084641579538584,
0.02241833508014679,
-0.04902871698141098,
-0.051892850548028946,
0.024605490267276764,
-0.05087738484144211,
-0.043508756905794144,
0.04814344272017479,
0.006939008831977844,
-0.008494752459228039,
-0.08670505881309509,
-0.00952974520623684,
-... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "guiSecurityBanner"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "guiSecurityBannerText"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "guiSetup"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "lcdDisplay"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "mgmtDhcp"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "netReboot"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "quietBoot"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "consoleInactivityTimeout"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "security_banner"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "banner_text"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "gui_setup"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "lcd_display"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "mgmt_dhcp"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "net_reboot"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "quiet_boot"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "console_timeout"}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "api_map", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "guiSecurityBanner"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "guiSecurityBannerText"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "guiSetup"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "lcdDisplay"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "mgmtDhcp"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "netReboot"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "quietBoot"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "consoleInactivityTimeout"}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "api_attributes", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "security_banner"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "banner_text"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "gui_setup"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "lcd_display"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "mgmt_dhcp"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "net_reboot"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "quiet_boot"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "console_timeout"}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "returnables", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "security_banner"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "banner_text"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "gui_setup"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "lcd_display"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "mgmt_dhcp"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "net_reboot"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "quiet_boot"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "console_timeout"}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "updatables", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "security_banner"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "flatten_boolean", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "security_banner", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "gui_setup"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "flatten_boolean", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "gui_setup", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "lcd_display"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "flatten_boolean", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "lcd_display", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "mgmt_dhcp"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "flatten_boolean", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "mgmt_dhcp", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "net_reboot"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "flatten_boolean", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "net_reboot", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "quiet_boot"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "flatten_boolean", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "quiet_boot", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}], "name": "Parameters", "bases": [{"_type": "Name", "_fields": {"id": "AnsibleF5Parameters", "ctx": {"_type": "Load", "_fields": {}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class Parameters(AnsibleF5Parameters):
api_map = {
'guiSecurityBanner': 'security_banner',
'guiSecurityBannerText': 'banner_text',
'guiSetup': 'gui_setup',
'lcdDisplay': 'lcd_display',
'mgmtDhcp': 'mgmt_dhcp',
'netReboot': 'net_reboot',
'quietBoot': 'quiet_boot',
'consoleInactivityTimeout': 'console_timeout',
}
api_attributes = [
'guiSecurityBanner',
'guiSecurityBannerText',
'guiSetup',
'lcdDisplay',
'mgmtDhcp',
'netReboot',
'quietBoot',
'consoleInactivityTimeout',
]
returnables = [
'security_banner',
'banner_text',
'gui_setup',
'lcd_display',
'mgmt_dhcp',
'net_reboot',
'quiet_boot',
'console_timeout',
]
updatables = [
'security_banner',
'banner_text',
'gui_setup',
'lcd_display',
'mgmt_dhcp',
'net_reboot',
'quiet_boot',
'console_timeout',
]
@property
def security_banner(self):
return flatten_boolean(self._values['security_banner'])
@property
def gui_setup(self):
return flatten_boolean(self._values['gui_setup'])
@property
def lcd_display(self):
return flatten_boolean(self._values['lcd_display'])
@property
def mgmt_dhcp(self):
return flatten_boolean(self._values['mgmt_dhcp'])
@property
def net_reboot(self):
return flatten_boolean(self._values['net_reboot'])
@property
def quiet_boot(self):
return flatten_boolean(self._values['quiet_boot']) | |
9,723 | [
0.038615476340055466,
0.002109190681949258,
0.05261220410466194,
-0.010020384564995766,
0.026886994019150734,
-0.005483895540237427,
-0.018201276659965515,
-0.028214747086167336,
0.03383003547787666,
0.0024048229679465294,
-0.01763421669602394,
-0.01176305953413248,
-0.02565605565905571,
0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": null}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Is", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "security_banner"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "enabled"}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "security_banner"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "yes"}}]}}, "orelse": []}}, {"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "disabled"}}}}], "name": "security_banner", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": null}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Is", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "gui_setup"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "enabled"}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "gui_setup"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "yes"}}]}}, "orelse": []}}, {"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "disabled"}}}}], "name": "gui_setup", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": null}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Is", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "lcd_display"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "enabled"}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "lcd_display"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "yes"}}]}}, "orelse": []}}, {"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "disabled"}}}}], "name": "lcd_display", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": null}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Is", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "mgmt_dhcp"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "enabled"}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "mgmt_dhcp"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "yes"}}]}}, "orelse": []}}, {"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "disabled"}}}}], "name": "mgmt_dhcp", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": null}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Is", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "net_reboot"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "enabled"}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "net_reboot"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "yes"}}]}}, "orelse": []}}, {"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "disabled"}}}}], "name": "net_reboot", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": null}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Is", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "quiet_boot"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "enabled"}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "quiet_boot"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "yes"}}]}}, "orelse": []}}, {"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "disabled"}}}}], "name": "quiet_boot", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}], "name": "UsableChanges", "bases": [{"_type": "Name", "_fields": {"id": "Changes", "ctx": {"_type": "Load", "_fields": {}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class UsableChanges(Changes):
@property
def security_banner(self):
if self._values['security_banner'] is None:
return None
if self._values['security_banner'] == 'yes':
return 'enabled'
return 'disabled'
@property
def gui_setup(self):
if self._values['gui_setup'] is None:
return None
if self._values['gui_setup'] == 'yes':
return 'enabled'
return 'disabled'
@property
def lcd_display(self):
if self._values['lcd_display'] is None:
return None
if self._values['lcd_display'] == 'yes':
return 'enabled'
return 'disabled'
@property
def mgmt_dhcp(self):
if self._values['mgmt_dhcp'] is None:
return None
if self._values['mgmt_dhcp'] == 'yes':
return 'enabled'
return 'disabled'
@property
def net_reboot(self):
if self._values['net_reboot'] is None:
return None
if self._values['net_reboot'] == 'yes':
return 'enabled'
return 'disabled'
@property
def quiet_boot(self):
if self._values['quiet_boot'] is None:
return None
if self._values['quiet_boot'] == 'yes':
return 'enabled'
return 'disabled' | |
9,724 | [
0.045249342918395996,
0.007110800594091415,
0.07183697819709778,
-0.011630432680249214,
0.01373120117932558,
0.014924065209925175,
-0.027966056019067764,
-0.03395688906311989,
0.022280065342783928,
0.02579239010810852,
-0.017429081723093987,
-0.019006313756108284,
-0.02809859625995159,
0.0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "security_banner"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "flatten_boolean", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "security_banner", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "gui_setup"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "flatten_boolean", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "gui_setup", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "lcd_display"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "flatten_boolean", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "lcd_display", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "mgmt_dhcp"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "flatten_boolean", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "mgmt_dhcp", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "net_reboot"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "flatten_boolean", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "net_reboot", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "quiet_boot"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_values", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "flatten_boolean", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "quiet_boot", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}], "name": "ReportableChanges", "bases": [{"_type": "Name", "_fields": {"id": "Changes", "ctx": {"_type": "Load", "_fields": {}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class ReportableChanges(Changes):
@property
def security_banner(self):
return flatten_boolean(self._values['security_banner'])
@property
def gui_setup(self):
return flatten_boolean(self._values['gui_setup'])
@property
def lcd_display(self):
return flatten_boolean(self._values['lcd_display'])
@property
def mgmt_dhcp(self):
return flatten_boolean(self._values['mgmt_dhcp'])
@property
def net_reboot(self):
return flatten_boolean(self._values['net_reboot'])
@property
def quiet_boot(self):
return flatten_boolean(self._values['quiet_boot']) | |
9,725 | [
0.021934479475021362,
-0.021837899461388588,
-0.03382460027933121,
0.007844474166631699,
0.07468883693218231,
-0.013070546090602875,
-0.009314642287790775,
-0.022256415337324142,
-0.0011596353724598885,
-0.0072971852496266365,
-0.02114037424325943,
-0.06091003492474556,
0.0032327603548765182... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "want", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "have", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "want", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "want", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "have", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "have", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "name": "__init__", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "param", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Try", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "param", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "getattr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}}}], "orelse": [], "handlers": [{"_type": "ExceptHandler", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "param", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "__default", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": null, "type": {"_type": "Name", "_fields": {"id": "AttributeError", "ctx": {"_type": "Load", "_fields": {}}}}}}], "finalbody": []}}], "name": "compare", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "param", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "want", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Name", "_fields": {"id": "param", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "getattr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "want", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Try", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "have", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Name", "_fields": {"id": "param", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "getattr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "have", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "want", "ctx": {"_type": "Load", "_fields": {}}}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "NotEq", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "want", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Name", "_fields": {"id": "have", "ctx": {"_type": "Load", "_fields": {}}}}]}}, "orelse": []}}], "orelse": [], "handlers": [{"_type": "ExceptHandler", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "want", "ctx": {"_type": "Load", "_fields": {}}}}}}], "name": null, "type": {"_type": "Name", "_fields": {"id": "AttributeError", "ctx": {"_type": "Load", "_fields": {}}}}}}], "finalbody": []}}], "name": "__default", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "Difference", "bases": [{"_type": "Name", "_fields": {"id": "object", "ctx": {"_type": "Load", "_fields": {}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class Difference(object):
def __init__(self, want, have=None):
self.want = want
self.have = have
def compare(self, param):
try:
result = getattr(self, param)
return result
except AttributeError:
return self.__default(param)
def __default(self, param):
want = getattr(self.want, param)
try:
have = getattr(self.have, param)
if want != have:
return want
except AttributeError:
return want | |
9,726 | [
0.01630350761115551,
0.007125146221369505,
-0.04328862205147743,
0.005444687325507402,
0.03842445835471153,
-0.025714078918099403,
-0.0032631459180265665,
0.00836563017219305,
0.005783834494650364,
-0.008707833476364613,
-0.027669521048665047,
-0.011812099255621433,
-0.006709614302963018,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "param", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "want", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Name", "_fields": {"id": "param", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "getattr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "want", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Try", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "have", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Name", "_fields": {"id": "param", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "getattr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "have", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "want", "ctx": {"_type": "Load", "_fields": {}}}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "NotEq", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "want", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Name", "_fields": {"id": "have", "ctx": {"_type": "Load", "_fields": {}}}}]}}, "orelse": []}}], "orelse": [], "handlers": [{"_type": "ExceptHandler", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "want", "ctx": {"_type": "Load", "_fields": {}}}}}}], "name": null, "type": {"_type": "Name", "_fields": {"id": "AttributeError", "ctx": {"_type": "Load", "_fields": {}}}}}}], "finalbody": []}}], "name": "__default", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def __default(self, param):
want = getattr(self.want, param)
try:
have = getattr(self.have, param)
if want != have:
return want
except AttributeError:
return want | |
9,727 | [
-0.012362390756607056,
0.06786894798278809,
-0.006636584643274546,
-0.029628975316882133,
-0.0035284720361232758,
0.04203594848513603,
0.0008853025501593947,
-0.01588449440896511,
0.02810039557516575,
0.03352685272693634,
0.010216009803116322,
-0.03925902768969536,
-0.058289848268032074,
-... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment": null}}, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "module"}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Name", "_fields": {"id": "kwargs", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "module", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "client"}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Name", "_fields": {"id": "kwargs", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "client", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "ModuleParameters", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "params", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "params", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "module", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "want", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "ApiParameters", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "have", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "UsableChanges", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "changes", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "name": "__init__", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [], "values": []}}, "targets": [{"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "want", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Name", "_fields": {"id": "key", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "getattr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "key", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "IsNot", "_fields": {}}], "left": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "want", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Name", "_fields": {"id": "key", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "getattr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}]}}, "orelse": []}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "returnables", "value": {"_type": "Name", "_fields": {"id": "Parameters", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "key", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "UsableChanges", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "params", "value": {"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "changes", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Load", "_fields": {}}}}, "orelse": []}}], "name": "_set_changed_options", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "want", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "have", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "Difference", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "diff", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "updatables", "value": {"_type": "Name", "_fields": {"id": "Parameters", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Name", "_fields": {"id": "updatables", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "k", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "compare", "value": {"_type": "Name", "_fields": {"id": "diff", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "change", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Continue", "_fields": {}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Is", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "change", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}]}}, "orelse": [{"_type": "If", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "change", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "update", "value": {"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "test": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "change", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "isinstance", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "orelse": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "change", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "k", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}]}}]}}], "iter": {"_type": "Name", "_fields": {"id": "updatables", "ctx": {"_type": "Load", "_fields": {}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "k", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "UsableChanges", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "params", "value": {"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "changes", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}], "test": {"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Load", "_fields": {}}}}, "orelse": []}}, {"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}], "name": "_update_changed_options", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_update_changed_options", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}], "test": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}, "orelse": []}}, {"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}], "name": "should_update", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "present", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "ReportableChanges", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "params", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "to_return", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "changes", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "reportable", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "to_return", "value": {"_type": "Name", "_fields": {"id": "reportable", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "changes", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "update", "value": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": null, "value": {"_type": "Name", "_fields": {"id": "changes", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "changed", "value": {"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "update", "value": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_announce_deprecations", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}}}], "name": "exec_module", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "result", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "__warnings"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "pop", "value": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "warnings", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "deprecate", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "module", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "msg", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "msg"}}, "value": {"_type": "Name", "_fields": {"id": "warning", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "keyword", "_fields": {"arg": "version", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "version"}}, "value": {"_type": "Name", "_fields": {"id": "warning", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}}}], "iter": {"_type": "Name", "_fields": {"id": "warnings", "ctx": {"_type": "Load", "_fields": {}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "warning", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}], "name": "_announce_deprecations", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "update", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "present", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "read_current_from_device", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "have", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}], "test": {"_type": "UnaryOp", "_fields": {"op": {"_type": "Not", "_fields": {}}, "operand": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "should_update", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}], "test": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "check_mode", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "module", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "orelse": []}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "update_on_device", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}], "name": "update", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "server"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "provider", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "client", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "server_port"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "provider", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "client", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "format", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "https://{0}:{1}/mgmt/tm/sys/global-settings/"}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "uri", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "uri", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "api", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "client", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "resp", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Try", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "json", "value": {"_type": "Name", "_fields": {"id": "resp", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "orelse": [], "handlers": [{"_type": "ExceptHandler", "_fields": {"body": [{"_type": "Raise", "_fields": {"exc": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "ex", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "str", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Name", "_fields": {"id": "F5ModuleError", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "cause": null}}], "name": "ex", "type": {"_type": "Name", "_fields": {"id": "ValueError", "ctx": {"_type": "Load", "_fields": {}}}}}}], "finalbody": []}}, {"_type": "If", "_fields": {"body": [{"_type": "If", "_fields": {"body": [{"_type": "Raise", "_fields": {"exc": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "message"}}, "value": {"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "F5ModuleError", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "cause": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "In", "_fields": {}}], "left": {"_type": "Constant", "_fields": {"kind": null, "value": "message"}}, "comparators": [{"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}]}}, "orelse": [{"_type": "Raise", "_fields": {"exc": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "content", "value": {"_type": "Name", "_fields": {"id": "resp", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "F5ModuleError", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "cause": null}}]}}], "test": {"_type": "BoolOp", "_fields": {"op": {"_type": "And", "_fields": {}}, "values": [{"_type": "Compare", "_fields": {"ops": [{"_type": "In", "_fields": {}}], "left": {"_type": "Constant", "_fields": {"kind": null, "value": "code"}}, "comparators": [{"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "code"}}, "value": {"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": 400}}]}}]}}, "orelse": []}}, {"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "ApiParameters", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "params", "value": {"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}}}], "name": "read_current_from_device", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "api_params", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "changes", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "params", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "server"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "provider", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "client", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "server_port"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "provider", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "client", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "format", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "https://{0}:{1}/mgmt/tm/sys/global-settings/"}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "uri", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "uri", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "patch", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "api", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "client", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "json", "value": {"_type": "Name", "_fields": {"id": "params", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "resp", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Try", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "json", "value": {"_type": "Name", "_fields": {"id": "resp", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "orelse": [], "handlers": [{"_type": "ExceptHandler", "_fields": {"body": [{"_type": "Raise", "_fields": {"exc": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "ex", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "str", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Name", "_fields": {"id": "F5ModuleError", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "cause": null}}], "name": "ex", "type": {"_type": "Name", "_fields": {"id": "ValueError", "ctx": {"_type": "Load", "_fields": {}}}}}}], "finalbody": []}}, {"_type": "If", "_fields": {"body": [{"_type": "If", "_fields": {"body": [{"_type": "Raise", "_fields": {"exc": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "message"}}, "value": {"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "F5ModuleError", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "cause": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "In", "_fields": {}}], "left": {"_type": "Constant", "_fields": {"kind": null, "value": "message"}}, "comparators": [{"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}]}}, "orelse": [{"_type": "Raise", "_fields": {"exc": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "content", "value": {"_type": "Name", "_fields": {"id": "resp", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "F5ModuleError", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "cause": null}}]}}], "test": {"_type": "BoolOp", "_fields": {"op": {"_type": "And", "_fields": {}}, "values": [{"_type": "Compare", "_fields": {"ops": [{"_type": "In", "_fields": {}}], "left": {"_type": "Constant", "_fields": {"kind": null, "value": "code"}}, "comparators": [{"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "code"}}, "value": {"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": 400}}]}}]}}, "orelse": []}}], "name": "update_on_device", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "ModuleManager", "bases": [{"_type": "Name", "_fields": {"id": "object", "ctx": {"_type": "Load", "_fields": {}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class ModuleManager(object):
def __init__(self, *args, **kwargs):
self.module = kwargs.get('module', None)
self.client = kwargs.get('client', None)
self.want = ModuleParameters(params=self.module.params)
self.have = ApiParameters()
self.changes = UsableChanges()
def _set_changed_options(self):
changed = {}
for key in Parameters.returnables:
if getattr(self.want, key) is not None:
changed[key] = getattr(self.want, key)
if changed:
self.changes = UsableChanges(params=changed)
def _update_changed_options(self):
diff = Difference(self.want, self.have)
updatables = Parameters.updatables
changed = dict()
for k in updatables:
change = diff.compare(k)
if change is None:
continue
else:
if isinstance(change, dict):
changed.update(change)
else:
changed[k] = change
if changed:
self.changes = UsableChanges(params=changed)
return True
return False
def should_update(self):
result = self._update_changed_options()
if result:
return True
return False
def exec_module(self):
result = dict()
changed = self.present()
reportable = ReportableChanges(params=self.changes.to_return())
changes = reportable.to_return()
result.update(**changes)
result.update(dict(changed=changed))
self._announce_deprecations(result)
return result
def _announce_deprecations(self, result):
warnings = result.pop('__warnings', [])
for warning in warnings:
self.module.deprecate(
msg=warning['msg'],
version=warning['version']
)
def present(self):
return self.update()
def update(self):
self.have = self.read_current_from_device()
if not self.should_update():
return False
if self.module.check_mode:
return True
self.update_on_device()
return True
def read_current_from_device(self):
uri = "https://{0}:{1}/mgmt/tm/sys/global-settings/".format(
self.client.provider['server'],
self.client.provider['server_port'],
)
resp = self.client.api.get(uri)
try:
response = resp.json()
except ValueError as ex:
raise F5ModuleError(str(ex))
if 'code' in response and response['code'] == 400:
if 'message' in response:
raise F5ModuleError(response['message'])
else:
raise F5ModuleError(resp.content)
return ApiParameters(params=response)
def update_on_device(self):
params = self.changes.api_params()
uri = "https://{0}:{1}/mgmt/tm/sys/global-settings/".format(
self.client.provider['server'],
self.client.provider['server_port'],
)
resp = self.client.api.patch(uri, json=params)
try:
response = resp.json()
except ValueError as ex:
raise F5ModuleError(str(ex))
if 'code' in response and response['code'] == 400:
if 'message' in response:
raise F5ModuleError(response['message'])
else:
raise F5ModuleError(resp.content) | |
9,728 | [
0.003059339476749301,
0.0030374201014637947,
0.0025755444075912237,
0.013314546085894108,
0.017986536026000977,
0.016946924850344658,
0.033317681401968,
-0.021856898441910744,
0.018487554043531418,
0.030737439170479774,
0.016896823421120644,
-0.05506185069680214,
-0.03990606218576431,
0.05... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "want", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "have", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "Difference", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "diff", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "updatables", "value": {"_type": "Name", "_fields": {"id": "Parameters", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Name", "_fields": {"id": "updatables", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "k", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "compare", "value": {"_type": "Name", "_fields": {"id": "diff", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "change", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Continue", "_fields": {}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Is", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "change", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}]}}, "orelse": [{"_type": "If", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "change", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "update", "value": {"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "test": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "change", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "isinstance", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "orelse": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "change", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "k", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}]}}]}}], "iter": {"_type": "Name", "_fields": {"id": "updatables", "ctx": {"_type": "Load", "_fields": {}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "k", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "UsableChanges", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "params", "value": {"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "changes", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}], "test": {"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Load", "_fields": {}}}}, "orelse": []}}, {"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}], "name": "_update_changed_options", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def _update_changed_options(self):
diff = Difference(self.want, self.have)
updatables = Parameters.updatables
changed = dict()
for k in updatables:
change = diff.compare(k)
if change is None:
continue
else:
if isinstance(change, dict):
changed.update(change)
else:
changed[k] = change
if changed:
self.changes = UsableChanges(params=changed)
return True
return False | |
9,729 | [
0.04779284447431564,
0.024340549483895302,
0.02289714105427265,
-0.02235431969165802,
-0.00037029740633443,
0.055762432515621185,
-0.0038675935938954353,
0.010646676644682884,
0.018307842314243317,
-0.0010563402902334929,
0.03222377598285675,
-0.05778567120432854,
0.006723567843437195,
-0.... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "present", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "ReportableChanges", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "params", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "to_return", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "changes", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "reportable", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "to_return", "value": {"_type": "Name", "_fields": {"id": "reportable", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "changes", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "update", "value": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": null, "value": {"_type": "Name", "_fields": {"id": "changes", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "changed", "value": {"_type": "Name", "_fields": {"id": "changed", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "update", "value": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_announce_deprecations", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}}}], "name": "exec_module", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def exec_module(self):
result = dict()
changed = self.present()
reportable = ReportableChanges(params=self.changes.to_return())
changes = reportable.to_return()
result.update(**changes)
result.update(dict(changed=changed))
self._announce_deprecations(result)
return result | |
9,730 | [
0.04488178715109825,
0.015050110407173634,
-0.01556384563446045,
-0.0063224476762115955,
0.059499893337488174,
0.05819220468401909,
0.03652191162109375,
0.0071455915458500385,
0.015178544446825981,
0.00023898910149000585,
-0.0009143613278865814,
-0.010455681942403316,
-0.05730484426021576,
... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "read_current_from_device", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "have", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}], "test": {"_type": "UnaryOp", "_fields": {"op": {"_type": "Not", "_fields": {}}, "operand": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "should_update", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}], "test": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "check_mode", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "module", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "orelse": []}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "update_on_device", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}], "name": "update", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def update(self):
self.have = self.read_current_from_device()
if not self.should_update():
return False
if self.module.check_mode:
return True
self.update_on_device()
return True | |
9,731 | [
-0.0041068969294428825,
0.025203652679920197,
-0.03649544715881348,
-0.0006727688596583903,
0.03086114302277565,
0.0090427091345191,
-0.031069820746779442,
-0.006712472531944513,
0.041828326880931854,
-0.010254200547933578,
-0.013251046650111675,
-0.03477964922785759,
-0.026780331507325172,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "server"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "provider", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "client", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "server_port"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "provider", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "client", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "format", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "https://{0}:{1}/mgmt/tm/sys/global-settings/"}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "uri", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "uri", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "api", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "client", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "resp", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Try", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "json", "value": {"_type": "Name", "_fields": {"id": "resp", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "orelse": [], "handlers": [{"_type": "ExceptHandler", "_fields": {"body": [{"_type": "Raise", "_fields": {"exc": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "ex", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "str", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Name", "_fields": {"id": "F5ModuleError", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "cause": null}}], "name": "ex", "type": {"_type": "Name", "_fields": {"id": "ValueError", "ctx": {"_type": "Load", "_fields": {}}}}}}], "finalbody": []}}, {"_type": "If", "_fields": {"body": [{"_type": "If", "_fields": {"body": [{"_type": "Raise", "_fields": {"exc": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "message"}}, "value": {"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "F5ModuleError", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "cause": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "In", "_fields": {}}], "left": {"_type": "Constant", "_fields": {"kind": null, "value": "message"}}, "comparators": [{"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}]}}, "orelse": [{"_type": "Raise", "_fields": {"exc": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "content", "value": {"_type": "Name", "_fields": {"id": "resp", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "F5ModuleError", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "cause": null}}]}}], "test": {"_type": "BoolOp", "_fields": {"op": {"_type": "And", "_fields": {}}, "values": [{"_type": "Compare", "_fields": {"ops": [{"_type": "In", "_fields": {}}], "left": {"_type": "Constant", "_fields": {"kind": null, "value": "code"}}, "comparators": [{"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "code"}}, "value": {"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": 400}}]}}]}}, "orelse": []}}, {"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "ApiParameters", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "params", "value": {"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}}}], "name": "read_current_from_device", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def read_current_from_device(self):
uri = "https://{0}:{1}/mgmt/tm/sys/global-settings/".format(
self.client.provider['server'],
self.client.provider['server_port'],
)
resp = self.client.api.get(uri)
try:
response = resp.json()
except ValueError as ex:
raise F5ModuleError(str(ex))
if 'code' in response and response['code'] == 400:
if 'message' in response:
raise F5ModuleError(response['message'])
else:
raise F5ModuleError(resp.content)
return ApiParameters(params=response) | |
9,732 | [
0.01821821928024292,
0.02669600397348404,
-0.013227749615907669,
0.014249893836677074,
0.0005877329385839403,
0.02082769200205803,
-0.0001268285559490323,
-0.010359732434153557,
0.014153691940009594,
-0.003556460840627551,
-0.013119522482156754,
0.006247105076909065,
-0.028163081035017967,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "api_params", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "changes", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "params", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "server"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "provider", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "client", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "server_port"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "provider", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "client", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "format", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "https://{0}:{1}/mgmt/tm/sys/global-settings/"}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "uri", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "uri", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "patch", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "api", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "client", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "json", "value": {"_type": "Name", "_fields": {"id": "params", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "resp", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Try", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "json", "value": {"_type": "Name", "_fields": {"id": "resp", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "orelse": [], "handlers": [{"_type": "ExceptHandler", "_fields": {"body": [{"_type": "Raise", "_fields": {"exc": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "ex", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "str", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Name", "_fields": {"id": "F5ModuleError", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "cause": null}}], "name": "ex", "type": {"_type": "Name", "_fields": {"id": "ValueError", "ctx": {"_type": "Load", "_fields": {}}}}}}], "finalbody": []}}, {"_type": "If", "_fields": {"body": [{"_type": "If", "_fields": {"body": [{"_type": "Raise", "_fields": {"exc": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "message"}}, "value": {"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "F5ModuleError", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "cause": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "In", "_fields": {}}], "left": {"_type": "Constant", "_fields": {"kind": null, "value": "message"}}, "comparators": [{"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}]}}, "orelse": [{"_type": "Raise", "_fields": {"exc": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "content", "value": {"_type": "Name", "_fields": {"id": "resp", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "F5ModuleError", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "cause": null}}]}}], "test": {"_type": "BoolOp", "_fields": {"op": {"_type": "And", "_fields": {}}, "values": [{"_type": "Compare", "_fields": {"ops": [{"_type": "In", "_fields": {}}], "left": {"_type": "Constant", "_fields": {"kind": null, "value": "code"}}, "comparators": [{"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "code"}}, "value": {"_type": "Name", "_fields": {"id": "response", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": 400}}]}}]}}, "orelse": []}}], "name": "update_on_device", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def update_on_device(self):
params = self.changes.api_params()
uri = "https://{0}:{1}/mgmt/tm/sys/global-settings/".format(
self.client.provider['server'],
self.client.provider['server_port'],
)
resp = self.client.api.patch(uri, json=params)
try:
response = resp.json()
except ValueError as ex:
raise F5ModuleError(str(ex))
if 'code' in response and response['code'] == 400:
if 'message' in response:
raise F5ModuleError(response['message'])
else:
raise F5ModuleError(resp.content) | |
9,733 | [
0.029221558943390846,
0.017916439101099968,
-0.020610373467206955,
0.019445747137069702,
-0.029174502938985825,
-0.003085085889324546,
-0.018822260200977325,
-0.016504768282175064,
0.05853722617030144,
0.06390157341957092,
0.005405517760664225,
-0.02943330816924572,
0.01624596305191517,
0.... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "supports_check_mode", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "present"}}]}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "states", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "security_banner", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "type", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "bool"}}}}]}}}}, {"_type": "keyword", "_fields": {"arg": "banner_text", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}, {"_type": "keyword", "_fields": {"arg": "gui_setup", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "type", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "bool"}}}}]}}}}, {"_type": "keyword", "_fields": {"arg": "lcd_display", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "type", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "bool"}}}}]}}}}, {"_type": "keyword", "_fields": {"arg": "mgmt_dhcp", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "type", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "bool"}}}}]}}}}, {"_type": "keyword", "_fields": {"arg": "net_reboot", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "type", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "bool"}}}}]}}}}, {"_type": "keyword", "_fields": {"arg": "quiet_boot", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "type", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "bool"}}}}]}}}}, {"_type": "keyword", "_fields": {"arg": "console_timeout", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "type", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "int"}}}}]}}}}, {"_type": "keyword", "_fields": {"arg": "state", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "present"}}}}, {"_type": "keyword", "_fields": {"arg": "choices", "value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "present"}}]}}}}]}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "argument_spec", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [], "values": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "argument_spec", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "f5_argument_spec", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "update", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "argument_spec", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "argument_spec", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "update", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "argument_spec", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}], "name": "__init__", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "ArgumentSpec", "bases": [{"_type": "Name", "_fields": {"id": "object", "ctx": {"_type": "Load", "_fields": {}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class ArgumentSpec(object):
def __init__(self):
self.supports_check_mode = True
self.states = ['present']
argument_spec = dict(
security_banner=dict(
type='bool'
),
banner_text=dict(),
gui_setup=dict(
type='bool'
),
lcd_display=dict(
type='bool'
),
mgmt_dhcp=dict(
type='bool'
),
net_reboot=dict(
type='bool'
),
quiet_boot=dict(
type='bool'
),
console_timeout=dict(
type='int'
),
state=dict(
default='present', choices=['present']
)
)
self.argument_spec = {}
self.argument_spec.update(f5_argument_spec)
self.argument_spec.update(argument_spec) | |
9,734 | [
0.025937354192137718,
0.0433807373046875,
0.010315733961760998,
-0.01600874401628971,
-0.02769080176949501,
0.045862890779972076,
-0.03868969529867172,
0.004554408136755228,
0.06526466459035873,
0.042287677526474,
0.014904300682246685,
-0.07396358996629715,
-0.001035416265949607,
0.0075033... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "ArgumentSpec", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "spec", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "AnsibleModule", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "argument_spec", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "argument_spec", "value": {"_type": "Name", "_fields": {"id": "spec", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "keyword", "_fields": {"arg": "supports_check_mode", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "supports_check_mode", "value": {"_type": "Name", "_fields": {"id": "spec", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "module", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "F5RestClient", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": null, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "params", "value": {"_type": "Name", "_fields": {"id": "module", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "client", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Try", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "ModuleManager", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "module", "value": {"_type": "Name", "_fields": {"id": "module", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "keyword", "_fields": {"arg": "client", "value": {"_type": "Name", "_fields": {"id": "client", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "mm", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "exec_module", "value": {"_type": "Name", "_fields": {"id": "mm", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "results", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "client", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "cleanup_tokens", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "module", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "results", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "client", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "exit_json", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "orelse": [], "handlers": [{"_type": "ExceptHandler", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "client", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "cleanup_tokens", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "module", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "ex", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "client", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "fail_json", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "ex", "type": {"_type": "Name", "_fields": {"id": "F5ModuleError", "ctx": {"_type": "Load", "_fields": {}}}}}}], "finalbody": []}}], "name": "main", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def main():
spec = ArgumentSpec()
module = AnsibleModule(
argument_spec=spec.argument_spec,
supports_check_mode=spec.supports_check_mode
)
client = F5RestClient(**module.params)
try:
mm = ModuleManager(module=module, client=client)
results = mm.exec_module()
cleanup_tokens(client)
exit_json(module, results, client)
except F5ModuleError as ex:
cleanup_tokens(client)
fail_json(module, ex, client) | |
9,735 | [
0.02255718596279621,
0.018797654658555984,
-0.005382395349442959,
0.029148897156119347,
-0.021065905690193176,
0.02043931744992733,
0.007788495160639286,
0.017206119373440742,
0.05188152939081192,
0.09443941712379456,
0.014774956740438938,
-0.01283253263682127,
0.014712298288941383,
-0.004... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "supports_check_mode", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "present"}}]}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "states", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "security_banner", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "type", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "bool"}}}}]}}}}, {"_type": "keyword", "_fields": {"arg": "banner_text", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}, {"_type": "keyword", "_fields": {"arg": "gui_setup", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "type", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "bool"}}}}]}}}}, {"_type": "keyword", "_fields": {"arg": "lcd_display", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "type", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "bool"}}}}]}}}}, {"_type": "keyword", "_fields": {"arg": "mgmt_dhcp", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "type", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "bool"}}}}]}}}}, {"_type": "keyword", "_fields": {"arg": "net_reboot", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "type", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "bool"}}}}]}}}}, {"_type": "keyword", "_fields": {"arg": "quiet_boot", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "type", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "bool"}}}}]}}}}, {"_type": "keyword", "_fields": {"arg": "console_timeout", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "type", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "int"}}}}]}}}}, {"_type": "keyword", "_fields": {"arg": "state", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "present"}}}}, {"_type": "keyword", "_fields": {"arg": "choices", "value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "present"}}]}}}}]}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "argument_spec", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [], "values": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "argument_spec", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "f5_argument_spec", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "update", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "argument_spec", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "argument_spec", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "update", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "argument_spec", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}], "name": "__init__", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def __init__(self):
self.supports_check_mode = True
self.states = ['present']
argument_spec = dict(
security_banner=dict(
type='bool'
),
banner_text=dict(),
gui_setup=dict(
type='bool'
),
lcd_display=dict(
type='bool'
),
mgmt_dhcp=dict(
type='bool'
),
net_reboot=dict(
type='bool'
),
quiet_boot=dict(
type='bool'
),
console_timeout=dict(
type='int'
),
state=dict(
default='present', choices=['present']
)
)
self.argument_spec = {}
self.argument_spec.update(f5_argument_spec)
self.argument_spec.update(argument_spec) | |
9,736 | [
0.010482086800038815,
0.05965200066566467,
0.02991417795419693,
-0.06053377315402031,
-0.03405851498246193,
-0.027334989979863167,
0.0075832549482584,
0.023631539195775986,
0.006536148488521576,
-0.006833747494965792,
0.03513868898153305,
0.010052221827208996,
-0.018506228923797607,
-0.037... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "target_list", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "target_dicts", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "data", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "params", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [], "values": []}}, "targets": [{"_type": "Name", "_fields": {"id": "output_files", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Slice", "_fields": {"step": null, "lower": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "upper": {"_type": "Constant", "_fields": {"kind": null, "value": 2}}}}, "value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "qualified_target", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ParseQualifiedTarget", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "common", "value": {"_type": "Name", "_fields": {"id": "gyp", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, "targets": [{"_type": "List", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "input_file", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "target", "ctx": {"_type": "Store", "_fields": {}}}}]}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Continue", "_fields": {}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "NotEq", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Slice", "_fields": {"step": null, "lower": {"_type": "UnaryOp", "_fields": {"op": {"_type": "USub", "_fields": {}}, "operand": {"_type": "Constant", "_fields": {"kind": null, "value": 4}}}}, "upper": null}}, "value": {"_type": "Name", "_fields": {"id": "input_file", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": ".gyp"}}]}}, "orelse": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Slice", "_fields": {"step": null, "lower": null, "upper": {"_type": "UnaryOp", "_fields": {"op": {"_type": "USub", "_fields": {}}, "operand": {"_type": "Constant", "_fields": {"kind": null, "value": 4}}}}}}, "value": {"_type": "Name", "_fields": {"id": "input_file", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Name", "_fields": {"id": "input_file_stem", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "BinOp", "_fields": {"op": {"_type": "Add", "_fields": {}}, "left": {"_type": "BinOp", "_fields": {"op": {"_type": "Add", "_fields": {}}, "left": {"_type": "Name", "_fields": {"id": "input_file_stem", "ctx": {"_type": "Load", "_fields": {}}}}, "right": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "suffix", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "options"}}, "value": {"_type": "Name", "_fields": {"id": "params", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "right": {"_type": "Constant", "_fields": {"kind": null, "value": ".gypd"}}}}, "targets": [{"_type": "Name", "_fields": {"id": "output_file", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "input_file", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "output_file", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "output_files", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "UnaryOp", "_fields": {"op": {"_type": "Not", "_fields": {}}, "operand": {"_type": "Compare", "_fields": {"ops": [{"_type": "In", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "output_file", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Name", "_fields": {"id": "output_files", "ctx": {"_type": "Load", "_fields": {}}}}]}}}}, "orelse": []}}], "iter": {"_type": "Name", "_fields": {"id": "target_list", "ctx": {"_type": "Load", "_fields": {}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "qualified_target", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "output_file", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "w"}}], "func": {"_type": "Name", "_fields": {"id": "open", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "output", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "input_file", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "data", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Name", "_fields": {"id": "output", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "pprint", "value": {"_type": "Name", "_fields": {"id": "pprint", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "close", "value": {"_type": "Name", "_fields": {"id": "output", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "iteritems", "value": {"_type": "Name", "_fields": {"id": "output_files", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "orelse": [], "target": {"_type": "Tuple", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "output_file", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "input_file", "ctx": {"_type": "Store", "_fields": {}}}}]}}, "type_comment": null}}], "name": "GenerateOutput", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def GenerateOutput(target_list, target_dicts, data, params):
output_files = {}
for qualified_target in target_list:
[input_file, target] = \
gyp.common.ParseQualifiedTarget(qualified_target)[0:2]
if input_file[-4:] != '.gyp':
continue
input_file_stem = input_file[:-4]
output_file = input_file_stem + params['options'].suffix + '.gypd'
if not output_file in output_files:
output_files[output_file] = input_file
for output_file, input_file in output_files.iteritems():
output = open(output_file, 'w')
pprint.pprint(data[input_file], output)
output.close() | |
9,737 | [
0.0038596910890191793,
0.013946350663900375,
0.0576968677341938,
-0.0005008408334106207,
-0.01530643180012703,
-0.013799314387142658,
0.00602111779153347,
-0.052844684571027756,
-0.005554279312491417,
0.016585644334554672,
0.026245899498462677,
-0.05910841003060341,
-0.0003691978345159441,
... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "orm", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "lots_lot"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "planning_district"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "blank", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}, {"_type": "keyword", "_fields": {"arg": "related_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "+"}}}}, {"_type": "keyword", "_fields": {"arg": "null", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}, {"_type": "keyword", "_fields": {"arg": "on_delete", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "SET_NULL", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "keyword", "_fields": {"arg": "to", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "boundaries.Boundary"}}, "value": {"_type": "Name", "_fields": {"id": "orm", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_column", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "keep_default", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}]}}}}], "name": "forwards", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "orm", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "lots_lot"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "planning_district_id"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "delete_column", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "backwards", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": "u", "value": "actstream.action"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "auth.group"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "auth.permission"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "auth.user"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "availableproperties.availableproperty"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "boundaries.boundary"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "boundaries.layer"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "contenttypes.contenttype"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "landuse.landusearea"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "li.location"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "licenses.contact"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "licenses.license"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "licenses.licensetype"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "lots.lot"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "lots.lotgroup"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "lots.use"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "opa.accountowner"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "opa.billingaccount"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "organize.organizertype"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "owners.agencycode"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "owners.alias"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "owners.owner"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "parcels.parcel"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "phillyorganize.organizer"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "phillyorganize.watcher"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "steward.stewardproject"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "taxaccounts.taxaccount"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "violations.violation"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "violations.violationtype"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "waterdept.waterparcel"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "zoning.basedistrict"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "zoning.zoningtype"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "action_object_content_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "action_object_object_id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "actor_content_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "actor_object_id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "data"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "description"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "place"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "public"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "target_content_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "target_object_id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "timestamp"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "verb"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "ordering"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "('-timestamp',)"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Action"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "related_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "'action_object'"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "orm['contenttypes.ContentType']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "255"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "related_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "'actor'"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "orm['contenttypes.ContentType']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "255"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "jsonfield.fields.JSONField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.TextField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.contrib.gis.db.models.fields.PointField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.BooleanField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "related_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "'target'"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "orm['contenttypes.ContentType']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "255"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DateTimeField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "datetime.datetime.now"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "255"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "permissions"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "Group"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "80"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ManyToManyField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "symmetrical"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['auth.Permission']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "False"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "codename"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "content_type"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "ordering"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "unique_together"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "(u'content_type__app_label', u'content_type__model', u'codename')"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "((u'content_type', u'codename'),)"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Permission"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "100"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['contenttypes.ContentType']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "50"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "date_joined"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "email"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "first_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "groups"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "is_active"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "is_staff"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "is_superuser"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "last_login"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "last_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "password"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "user_permissions"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "username"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "User"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DateTimeField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "datetime.datetime.now"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.EmailField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "75"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "30"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ManyToManyField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "symmetrical"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['auth.Group']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "False"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.BooleanField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.BooleanField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "False"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.BooleanField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "False"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DateTimeField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "datetime.datetime.now"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "30"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "128"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ManyToManyField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "symmetrical"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['auth.Permission']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "False"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "30"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "added"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "address"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "agency"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "area"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "asset_id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "centroid"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "description"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "last_seen"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "mapreg"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "price"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "price_str"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "status"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "AvailableProperty"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DateTimeField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "auto_now_add"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "200"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "20"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DecimalField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_digits"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "decimal_places"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "15"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "10"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.contrib.gis.db.models.fields.PointField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [], "values": []}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.TextField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DateTimeField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [], "values": []}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "10"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DecimalField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_digits"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "decimal_places"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "12"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "50"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "'new and available'"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "30"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "geometry"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "label"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "layer"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "simplified_geometry"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "ordering"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "('layer__name', 'label')"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Boundary"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.contrib.gis.db.models.fields.MultiPolygonField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [], "values": []}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "256"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['boundaries.Layer']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.contrib.gis.db.models.fields.MultiPolygonField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "source_file"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "Layer"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "256"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.files.FileField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "100"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "app_label"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "model"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "ordering"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "unique_together"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "db_table"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "('name',)"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "(('app_label', 'model'),)"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "ContentType"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "'django_content_type'"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "100"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "100"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "100"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "added"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "area"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "category"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "description"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "geometry"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "object_id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "subcategory"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "vacant_building"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "LandUseArea"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DateTimeField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "auto_now_add"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DecimalField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_digits"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "decimal_places"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "15"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "30"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "30"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.contrib.gis.db.models.fields.MultiPolygonField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [], "values": []}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "15"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "30"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "10"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "address"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "external_id"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "point"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "zip_code"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "Location"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "300"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "30"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.contrib.gis.db.models.fields.PointField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [], "values": []}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "20"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "address1"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "address2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "city"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "company_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "contact_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "first_name"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "last_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "state"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "zip_code"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "Contact"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "300"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "300"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "300"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "300"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "32"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "300"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "300"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "100"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "20"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "expires_month"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "expires_year"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "external_id"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "inactive_datetime"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "issued_datetime"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "license_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "location"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "primary_contact"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "status"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "License"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "30"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.PositiveIntegerField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "30"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DateTimeField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DateTimeField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['licenses.LicenseType']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['li.Location']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['licenses.Contact']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "30"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "code"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "LicenseType"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "32"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.TextField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [], "values": []}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "added"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "address_line1"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "address_line2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "available_property"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "billing_account"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "centroid"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "city"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "city_council_district"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "country"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "group"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "known_use"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "known_use_certainty"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "known_use_locked"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "land_use_area"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "licenses"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "owner"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "parcel"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "planning_district"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "polygon"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "polygon_area"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "polygon_width"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "postal_code"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "state_province"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "tax_account"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "violations"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "water_parcel"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "zoning_district"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "Lot"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DateTimeField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "auto_now_add"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "150"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "150"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "on_delete"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['availableproperties.AvailableProperty']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "models.SET_NULL"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "on_delete"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['opa.BillingAccount']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "models.SET_NULL"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.contrib.gis.db.models.fields.PointField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "50"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "related_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "on_delete"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "'+'"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "models.SET_NULL"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "orm['boundaries.Boundary']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "40"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "on_delete"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['lots.LotGroup']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "models.SET_NULL"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "on_delete"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['lots.Use']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "models.SET_NULL"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.PositiveIntegerField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "0"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.BooleanField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "False"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "on_delete"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['landuse.LandUseArea']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "models.SET_NULL"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ManyToManyField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "symmetrical"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "False"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "orm['licenses.License']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "256"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "on_delete"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['owners.Owner']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "models.SET_NULL"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "on_delete"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['parcels.Parcel']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "models.SET_NULL"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "related_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "on_delete"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "'+'"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "models.SET_NULL"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "orm['boundaries.Boundary']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.contrib.gis.db.models.fields.MultiPolygonField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DecimalField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_digits"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "decimal_places"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "15"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DecimalField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_digits"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "decimal_places"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "10"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "10"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "40"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "on_delete"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['taxaccounts.TaxAccount']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "models.SET_NULL"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ManyToManyField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "symmetrical"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "False"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "orm['violations.Violation']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "on_delete"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['waterdept.WaterParcel']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "models.SET_NULL"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "on_delete"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['zoning.BaseDistrict']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "models.SET_NULL"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "lot_ptr"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "_ormbases"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "LotGroup"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": "u", "value": "lots.Lot"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.OneToOneField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['lots.Lot']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "slug"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "Use"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "200"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.SlugField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "200"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "owner"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "AccountOwner"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "256"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['owners.Owner']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "account_owner"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "assessment"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "external_id"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "improvement_area"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "improvement_description"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "land_area"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "last_updated"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "mailing_address"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "mailing_city"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "mailing_country"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "mailing_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "mailing_postal_code"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "mailing_state_province"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "property_address"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "sale_date"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "BillingAccount"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['opa.AccountOwner']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DecimalField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_digits"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "decimal_places"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "20"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "50"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.IntegerField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "300"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DecimalField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_digits"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "decimal_places"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "20"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "3"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DateTimeField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "auto_now"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "300"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "50"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "'USA'"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "40"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "300"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "10"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "40"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "300"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DateField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "is_group"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "OrganizerType"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.BooleanField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "False"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "64"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "code"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "AgencyCode"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "256"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "Alias"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "256"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "agency_codes"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "aliases"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "owner_type"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "Owner"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ManyToManyField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "symmetrical"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "False"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "orm['owners.AgencyCode']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ManyToManyField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "symmetrical"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "False"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "orm['owners.Alias']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "256"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "'unknown'"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "20"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "address"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "basereg"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "geometry"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "mapreg"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "stcod"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "Parcel"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "300"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "10"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.contrib.gis.db.models.fields.MultiPolygonField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [], "values": []}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "10"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "10"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "added"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "added_by"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "content_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "email"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "email_hash"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "facebook_page"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "notes"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "object_id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "phone"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "receive_text_messages"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "url"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "Organizer"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DateTimeField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "auto_now_add"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['auth.User']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['contenttypes.ContentType']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.EmailField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "75"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "40"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "256"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "256"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.TextField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.PositiveIntegerField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [], "values": []}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "32"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.BooleanField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "False"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['organize.OrganizerType']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.URLField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "200"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "added"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "added_by"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "content_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "email"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "email_hash"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "object_id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "phone"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "receive_text_messages"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "Watcher"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DateTimeField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "auto_now_add"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['auth.User']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['contenttypes.ContentType']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.EmailField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "75"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "40"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "256"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.PositiveIntegerField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [], "values": []}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "32"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.BooleanField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "False"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "content_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "farm_stand"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "land_tenure_status"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "object_id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "organizer"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "others_get_involved"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "part_of_nga"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "support_organization"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "use"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "waiting_list"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "StewardProject"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['contenttypes.ContentType']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.BooleanField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "False"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "'not sure'"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "50"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.PositiveIntegerField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [], "values": []}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['phillyorganize.Organizer']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.TextField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.BooleanField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "False"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "300"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['lots.Use']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.BooleanField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "False"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "amount_delinquent"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "billing_account"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "brt_number"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "building_category"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "building_description"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "exempt_abate_assessment"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "last_updated"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "market_value"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_period"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "min_period"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "owner_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "owner_name2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "property_address"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "property_city"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "property_postal_code"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "property_state_province"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "taxable_assessment"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "years_delinquent"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "TaxAccount"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DecimalField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_digits"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "decimal_places"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "15"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['opa.BillingAccount']"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "10"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "100"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "100"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DecimalField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_digits"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "decimal_places"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "15"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DateField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DecimalField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_digits"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "decimal_places"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "15"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DateField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DateField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "256"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "256"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "300"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "50"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "10"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "40"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DecimalField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_digits"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "decimal_places"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "15"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.IntegerField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "external_id"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "location"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "violation_datetime"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "violation_type"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "Violation"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "30"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['li.Location']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DateTimeField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['violations.ViolationType']"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "code"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "full_description"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "li_description"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "ViolationType"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "32"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.TextField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.TextField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [], "values": []}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "address"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "brt_account"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "building_code"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "building_description"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "building_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "gross_area"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "impervious_area"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "owner1"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "owner2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "parcel_id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "ten_code"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "WaterParcel"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "256"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "20"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "20"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "100"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "50"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DecimalField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_digits"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "decimal_places"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "20"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.DecimalField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_digits"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "decimal_places"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "20"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "256"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "256"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "20"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "20"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "geometry"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "zoning_type"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "BaseDistrict"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.contrib.gis.db.models.fields.MultiPolygonField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [], "values": []}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": "u", "value": "orm['zoning.ZoningType']"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "code"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "description"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "group"}}, {"_type": "Constant", "_fields": {"kind": "u", "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "long_code"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "ordering"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "('code',)"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "ZoningType"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "30"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.TextField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "null"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "blank"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "100"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "30"}}]}}]}}]}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "lots"}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "complete_apps", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "name": "Migration", "bases": [{"_type": "Name", "_fields": {"id": "SchemaMigration", "ctx": {"_type": "Load", "_fields": {}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Lot.planning_district'
db.add_column(u'lots_lot', 'planning_district',
self.gf('django.db.models.fields.related.ForeignKey')(blank=True, related_name='+', null=True, on_delete=models.SET_NULL, to=orm['boundaries.Boundary']),
keep_default=False)
def backwards(self, orm):
# Deleting field 'Lot.planning_district'
db.delete_column(u'lots_lot', 'planning_district_id')
models = {
u'actstream.action': {
'Meta': {'ordering': "('-timestamp',)", 'object_name': 'Action'},
'action_object_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'action_object'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}),
'action_object_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'actor_content_type': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'actor'", 'to': u"orm['contenttypes.ContentType']"}),
'actor_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'data': ('jsonfield.fields.JSONField', [], {'null': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'place': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'target_content_type': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'target'", 'null': 'True', 'to': u"orm['contenttypes.ContentType']"}),
'target_object_id': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True', 'blank': 'True'}),
'timestamp': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'verb': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
u'auth.group': {
'Meta': {'object_name': 'Group'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '80'}),
'permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'})
},
u'auth.permission': {
'Meta': {'ordering': "(u'content_type__app_label', u'content_type__model', u'codename')", 'unique_together': "((u'content_type', u'codename'),)", 'object_name': 'Permission'},
'codename': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '50'})
},
u'auth.user': {
'Meta': {'object_name': 'User'},
'date_joined': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'groups': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Group']", 'symmetrical': 'False', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'is_staff': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'is_superuser': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'last_login': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime.now'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '30', 'blank': 'True'}),
'password': ('django.db.models.fields.CharField', [], {'max_length': '128'}),
'user_permissions': ('django.db.models.fields.related.ManyToManyField', [], {'to': u"orm['auth.Permission']", 'symmetrical': 'False', 'blank': 'True'}),
'username': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'})
},
u'availableproperties.availableproperty': {
'Meta': {'object_name': 'AvailableProperty'},
'added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'address': ('django.db.models.fields.CharField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'}),
'agency': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
'area': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '15', 'decimal_places': '2', 'blank': 'True'}),
'asset_id': ('django.db.models.fields.CharField', [], {'max_length': '10', 'unique': 'True', 'null': 'True', 'blank': 'True'}),
'centroid': ('django.contrib.gis.db.models.fields.PointField', [], {}),
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_seen': ('django.db.models.fields.DateTimeField', [], {}),
'mapreg': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
'price': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '12', 'decimal_places': '2', 'blank': 'True'}),
'price_str': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
'status': ('django.db.models.fields.CharField', [], {'default': "'new and available'", 'max_length': '30'})
},
u'boundaries.boundary': {
'Meta': {'ordering': "('layer__name', 'label')", 'object_name': 'Boundary'},
'geometry': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'label': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'layer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['boundaries.Layer']"}),
'simplified_geometry': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {'null': 'True', 'blank': 'True'})
},
u'boundaries.layer': {
'Meta': {'object_name': 'Layer'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '256'}),
'source_file': ('django.db.models.fields.files.FileField', [], {'max_length': '100'})
},
u'contenttypes.contenttype': {
'Meta': {'ordering': "('name',)", 'unique_together': "(('app_label', 'model'),)", 'object_name': 'ContentType', 'db_table': "'django_content_type'"},
'app_label': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
},
u'landuse.landusearea': {
'Meta': {'object_name': 'LandUseArea'},
'added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'area': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '15', 'decimal_places': '2', 'blank': 'True'}),
'category': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
'description': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
'geometry': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'object_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '15'}),
'subcategory': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
'vacant_building': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'})
},
u'li.location': {
'Meta': {'object_name': 'Location'},
'address': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
'external_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'point': ('django.contrib.gis.db.models.fields.PointField', [], {}),
'zip_code': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'})
},
u'licenses.contact': {
'Meta': {'object_name': 'Contact'},
'address1': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
'address2': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
'company_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
'contact_type': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
'first_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
'state': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
'zip_code': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'})
},
u'licenses.license': {
'Meta': {'object_name': 'License'},
'expires_month': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'}),
'expires_year': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True', 'blank': 'True'}),
'external_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'inactive_datetime': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'issued_datetime': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'license_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['licenses.LicenseType']"}),
'location': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['li.Location']"}),
'primary_contact': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['licenses.Contact']", 'null': 'True', 'blank': 'True'}),
'status': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True', 'blank': 'True'})
},
u'licenses.licensetype': {
'Meta': {'object_name': 'LicenseType'},
'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.TextField', [], {})
},
u'lots.lot': {
'Meta': {'object_name': 'Lot'},
'added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'address_line1': ('django.db.models.fields.CharField', [], {'max_length': '150', 'null': 'True', 'blank': 'True'}),
'address_line2': ('django.db.models.fields.CharField', [], {'max_length': '150', 'null': 'True', 'blank': 'True'}),
'available_property': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['availableproperties.AvailableProperty']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'billing_account': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['opa.BillingAccount']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'centroid': ('django.contrib.gis.db.models.fields.PointField', [], {'null': 'True', 'blank': 'True'}),
'city': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
'city_council_district': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['boundaries.Boundary']"}),
'country': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
'group': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['lots.LotGroup']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'known_use': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['lots.Use']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'known_use_certainty': ('django.db.models.fields.PositiveIntegerField', [], {'default': '0'}),
'known_use_locked': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'land_use_area': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['landuse.LandUseArea']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'licenses': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['licenses.License']", 'null': 'True', 'blank': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['owners.Owner']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'parcel': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['parcels.Parcel']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'planning_district': ('django.db.models.fields.related.ForeignKey', [], {'blank': 'True', 'related_name': "'+'", 'null': 'True', 'on_delete': 'models.SET_NULL', 'to': u"orm['boundaries.Boundary']"}),
'polygon': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {'null': 'True', 'blank': 'True'}),
'polygon_area': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '15', 'decimal_places': '2', 'blank': 'True'}),
'polygon_width': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '10', 'decimal_places': '2', 'blank': 'True'}),
'postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
'state_province': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
'tax_account': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['taxaccounts.TaxAccount']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'violations': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['violations.Violation']", 'null': 'True', 'blank': 'True'}),
'water_parcel': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['waterdept.WaterParcel']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'}),
'zoning_district': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zoning.BaseDistrict']", 'null': 'True', 'on_delete': 'models.SET_NULL', 'blank': 'True'})
},
u'lots.lotgroup': {
'Meta': {'object_name': 'LotGroup', '_ormbases': [u'lots.Lot']},
u'lot_ptr': ('django.db.models.fields.related.OneToOneField', [], {'to': u"orm['lots.Lot']", 'unique': 'True', 'primary_key': 'True'})
},
u'lots.use': {
'Meta': {'object_name': 'Use'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '200'}),
'slug': ('django.db.models.fields.SlugField', [], {'max_length': '200'})
},
u'opa.accountowner': {
'Meta': {'object_name': 'AccountOwner'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '256'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['owners.Owner']", 'null': 'True', 'blank': 'True'})
},
u'opa.billingaccount': {
'Meta': {'object_name': 'BillingAccount'},
'account_owner': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['opa.AccountOwner']", 'null': 'True', 'blank': 'True'}),
'assessment': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '20', 'decimal_places': '2', 'blank': 'True'}),
'external_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '50'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'improvement_area': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'}),
'improvement_description': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
'land_area': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '20', 'decimal_places': '3', 'blank': 'True'}),
'last_updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'mailing_address': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
'mailing_city': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
'mailing_country': ('django.db.models.fields.CharField', [], {'default': "'USA'", 'max_length': '40', 'null': 'True', 'blank': 'True'}),
'mailing_name': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
'mailing_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
'mailing_state_province': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
'property_address': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
'sale_date': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'})
},
u'organize.organizertype': {
'Meta': {'object_name': 'OrganizerType'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'is_group': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '64'})
},
u'owners.agencycode': {
'Meta': {'object_name': 'AgencyCode'},
'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '256'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
},
u'owners.alias': {
'Meta': {'object_name': 'Alias'},
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '256'})
},
u'owners.owner': {
'Meta': {'object_name': 'Owner'},
'agency_codes': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['owners.AgencyCode']", 'null': 'True', 'blank': 'True'}),
'aliases': ('django.db.models.fields.related.ManyToManyField', [], {'symmetrical': 'False', 'to': u"orm['owners.Alias']", 'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '256'}),
'owner_type': ('django.db.models.fields.CharField', [], {'default': "'unknown'", 'max_length': '20'})
},
u'parcels.parcel': {
'Meta': {'object_name': 'Parcel'},
'address': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
'basereg': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
'geometry': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'mapreg': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
'stcod': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'})
},
u'phillyorganize.organizer': {
'Meta': {'object_name': 'Organizer'},
'added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'added_by': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
'email_hash': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
'facebook_page': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'notes': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
'phone': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
'receive_text_messages': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['organize.OrganizerType']"}),
'url': ('django.db.models.fields.URLField', [], {'max_length': '200', 'null': 'True', 'blank': 'True'})
},
u'phillyorganize.watcher': {
'Meta': {'object_name': 'Watcher'},
'added': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'added_by': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['auth.User']", 'null': 'True', 'blank': 'True'}),
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
'email': ('django.db.models.fields.EmailField', [], {'max_length': '75'}),
'email_hash': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
'phone': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True', 'blank': 'True'}),
'receive_text_messages': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
},
u'steward.stewardproject': {
'Meta': {'object_name': 'StewardProject'},
'content_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['contenttypes.ContentType']"}),
'farm_stand': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'land_tenure_status': ('django.db.models.fields.CharField', [], {'default': "'not sure'", 'max_length': '50'}),
'object_id': ('django.db.models.fields.PositiveIntegerField', [], {}),
'organizer': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['phillyorganize.Organizer']"}),
'others_get_involved': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'part_of_nga': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'support_organization': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
'use': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['lots.Use']"}),
'waiting_list': ('django.db.models.fields.BooleanField', [], {'default': 'False'})
},
u'taxaccounts.taxaccount': {
'Meta': {'object_name': 'TaxAccount'},
'amount_delinquent': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '15', 'decimal_places': '2', 'blank': 'True'}),
'billing_account': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['opa.BillingAccount']", 'null': 'True', 'blank': 'True'}),
'brt_number': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '10'}),
'building_category': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
'building_description': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
'exempt_abate_assessment': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '15', 'decimal_places': '2', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'last_updated': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
'market_value': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '15', 'decimal_places': '2', 'blank': 'True'}),
'max_period': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
'min_period': ('django.db.models.fields.DateField', [], {'null': 'True', 'blank': 'True'}),
'owner_name': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'owner_name2': ('django.db.models.fields.CharField', [], {'max_length': '256'}),
'property_address': ('django.db.models.fields.CharField', [], {'max_length': '300', 'null': 'True', 'blank': 'True'}),
'property_city': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
'property_postal_code': ('django.db.models.fields.CharField', [], {'max_length': '10', 'null': 'True', 'blank': 'True'}),
'property_state_province': ('django.db.models.fields.CharField', [], {'max_length': '40', 'null': 'True', 'blank': 'True'}),
'taxable_assessment': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '15', 'decimal_places': '2', 'blank': 'True'}),
'years_delinquent': ('django.db.models.fields.IntegerField', [], {'null': 'True', 'blank': 'True'})
},
u'violations.violation': {
'Meta': {'object_name': 'Violation'},
'external_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '30'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'location': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['li.Location']"}),
'violation_datetime': ('django.db.models.fields.DateTimeField', [], {'null': 'True', 'blank': 'True'}),
'violation_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['violations.ViolationType']"})
},
u'violations.violationtype': {
'Meta': {'object_name': 'ViolationType'},
'code': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '32'}),
'full_description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'li_description': ('django.db.models.fields.TextField', [], {})
},
u'waterdept.waterparcel': {
'Meta': {'object_name': 'WaterParcel'},
'address': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}),
'brt_account': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
'building_code': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
'building_description': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True', 'blank': 'True'}),
'building_type': ('django.db.models.fields.CharField', [], {'max_length': '50', 'null': 'True', 'blank': 'True'}),
'gross_area': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '20', 'decimal_places': '2', 'blank': 'True'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'impervious_area': ('django.db.models.fields.DecimalField', [], {'null': 'True', 'max_digits': '20', 'decimal_places': '2', 'blank': 'True'}),
'owner1': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}),
'owner2': ('django.db.models.fields.CharField', [], {'max_length': '256', 'null': 'True', 'blank': 'True'}),
'parcel_id': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'}),
'ten_code': ('django.db.models.fields.CharField', [], {'max_length': '20', 'null': 'True', 'blank': 'True'})
},
u'zoning.basedistrict': {
'Meta': {'object_name': 'BaseDistrict'},
'geometry': ('django.contrib.gis.db.models.fields.MultiPolygonField', [], {}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'zoning_type': ('django.db.models.fields.related.ForeignKey', [], {'to': u"orm['zoning.ZoningType']"})
},
u'zoning.zoningtype': {
'Meta': {'ordering': "('code',)", 'object_name': 'ZoningType'},
'code': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
'description': ('django.db.models.fields.TextField', [], {'null': 'True', 'blank': 'True'}),
'group': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
u'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'long_code': ('django.db.models.fields.CharField', [], {'max_length': '30'})
}
}
complete_apps = ['lots'] | |
9,738 | [
0.01872633956372738,
0.0450921393930912,
0.04352012276649475,
-0.020960262045264244,
-0.030006268993020058,
0.031137019395828247,
0.003936943598091602,
0.018933182582259178,
-0.008066942915320396,
0.02705528400838375,
-0.0020994734950363636,
-0.07314027845859528,
0.054220885038375854,
0.02... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "Address (Aux) Mass Edit"}}, "targets": [{"_type": "Name", "_fields": {"id": "_description", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "clv.address_aux.mass_edit"}}, "targets": [{"_type": "Name", "_fields": {"id": "_name", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Many2many", "value": {"_type": "Name", "_fields": {"id": "fields", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "comodel_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "clv.address_aux"}}}}, {"_type": "keyword", "_fields": {"arg": "relation", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "clv_address_aux_mass_edit_rel"}}}}, {"_type": "keyword", "_fields": {"arg": "string", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "Addresses (Aux)"}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "address_aux_ids", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Many2many", "value": {"_type": "Name", "_fields": {"id": "fields", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "comodel_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "clv.global_tag"}}}}, {"_type": "keyword", "_fields": {"arg": "relation", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "clv_address_aux_mass_edit_global_tag_rel"}}}}, {"_type": "keyword", "_fields": {"arg": "column1", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "address_aux_id"}}}}, {"_type": "keyword", "_fields": {"arg": "column2", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "global_tag_id"}}}}, {"_type": "keyword", "_fields": {"arg": "string", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "Global Tags"}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "global_tag_ids", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "add"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Add"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "remove_m2m"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Remove"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "set"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Set"}}]}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Selection", "value": {"_type": "Name", "_fields": {"id": "fields", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "string", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "Global Tags:"}}}}, {"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}, {"_type": "keyword", "_fields": {"arg": "readonly", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}, {"_type": "keyword", "_fields": {"arg": "required", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "global_tag_ids_selection", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Many2many", "value": {"_type": "Name", "_fields": {"id": "fields", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "comodel_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "clv.address.category"}}}}, {"_type": "keyword", "_fields": {"arg": "relation", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "clv_address_aux_mass_edit_category_rel"}}}}, {"_type": "keyword", "_fields": {"arg": "column1", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "address_aux_id"}}}}, {"_type": "keyword", "_fields": {"arg": "column2", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "category_id"}}}}, {"_type": "keyword", "_fields": {"arg": "string", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "Categories"}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "category_ids", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "add"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Add"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "remove_m2m"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Remove"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "set"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Set"}}]}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Selection", "value": {"_type": "Name", "_fields": {"id": "fields", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "string", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "Categories:"}}}}, {"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}, {"_type": "keyword", "_fields": {"arg": "readonly", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}, {"_type": "keyword", "_fields": {"arg": "required", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "category_ids_selection", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Many2many", "value": {"_type": "Name", "_fields": {"id": "fields", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "comodel_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "clv.address.marker"}}}}, {"_type": "keyword", "_fields": {"arg": "relation", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "clv_address_aux_mass_edit_marker_rel"}}}}, {"_type": "keyword", "_fields": {"arg": "column1", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "address_aux_id"}}}}, {"_type": "keyword", "_fields": {"arg": "column2", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "marker_id"}}}}, {"_type": "keyword", "_fields": {"arg": "string", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "Markers"}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "marker_ids", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "add"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Add"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "remove_m2m"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Remove"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "set"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Set"}}]}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Selection", "value": {"_type": "Name", "_fields": {"id": "fields", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "string", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "Markers:"}}}}, {"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}, {"_type": "keyword", "_fields": {"arg": "readonly", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}, {"_type": "keyword", "_fields": {"arg": "required", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "marker_ids_selection", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "set"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Set"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "remove"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Remove"}}]}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Selection", "value": {"_type": "Name", "_fields": {"id": "fields", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "string", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "Partner Entity Code:"}}}}, {"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}, {"_type": "keyword", "_fields": {"arg": "readonly", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}, {"_type": "keyword", "_fields": {"arg": "required", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "partner_entity_code_selection", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ensure_one", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "res_model"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "res_id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "view_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "view_mode"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "target"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "ir.actions.act_window"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_name", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "form"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "form"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "new"}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "action", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "action", "ctx": {"_type": "Load", "_fields": {}}}}}}], "name": "_reopen_form", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "multi", "value": {"_type": "Name", "_fields": {"id": "api", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "field_names", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "field_names", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "default_get", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "super", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "defaults", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "active_ids"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "context", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "env", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "address_aux_ids"}}, "value": {"_type": "Name", "_fields": {"id": "defaults", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "defaults", "ctx": {"_type": "Load", "_fields": {}}}}}}], "name": "default_get", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "model", "value": {"_type": "Name", "_fields": {"id": "api", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ensure_one", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "name", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 4}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "global_tag_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "global_tag_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "global_tag_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "global_tag_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "global_tag_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "add"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 3}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "global_tag_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "global_tag_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "global_tag_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "global_tag_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "global_tag_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "remove_m2m"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 3}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "global_tag_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "global_tag_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "global_tag_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "global_tag_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 4}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "global_tag_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "global_tag_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "global_tag_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "global_tag_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "global_tag_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "set"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 4}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "category_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "category_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "category_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "category_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "category_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "add"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 3}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "category_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "category_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "category_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "category_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "category_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "remove_m2m"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 3}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "category_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "category_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "category_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "category_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 4}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "category_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "category_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "category_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "category_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "category_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "set"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 4}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "marker_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "marker_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "marker_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "marker_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "marker_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "add"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 3}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "marker_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "marker_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "marker_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "marker_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "marker_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "remove_m2m"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 3}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "marker_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "marker_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "marker_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "marker_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 4}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "marker_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "marker_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "marker_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "marker_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "marker_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "set"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [], "values": []}}, "targets": [{"_type": "Name", "_fields": {"id": "vals", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "code", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "entity_code"}}, "value": {"_type": "Name", "_fields": {"id": "vals", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "vals", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "write", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "NotEq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "entity_code", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "code", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "orelse": []}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "partner_entity_code_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "set"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [], "values": []}}, "targets": [{"_type": "Name", "_fields": {"id": "vals", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "entity_code"}}, "value": {"_type": "Name", "_fields": {"id": "vals", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "vals", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "write", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "IsNot", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "entity_code", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": false}}]}}, "orelse": []}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "partner_entity_code_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "remove"}}]}}, "orelse": []}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "address_aux_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}], "name": "do_address_aux_mass_edit", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "multi", "value": {"_type": "Name", "_fields": {"id": "api", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "name": "AddressAuxMassEdit", "bases": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "TransientModel", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class AddressAuxMassEdit(models.TransientModel):
_description = 'Address (Aux) Mass Edit'
_name = 'clv.address_aux.mass_edit'
address_aux_ids = fields.Many2many(
comodel_name='clv.address_aux',
relation='clv_address_aux_mass_edit_rel',
string='Addresses (Aux)'
)
global_tag_ids = fields.Many2many(
comodel_name='clv.global_tag',
relation='clv_address_aux_mass_edit_global_tag_rel',
column1='address_aux_id',
column2='global_tag_id',
string='Global Tags'
)
global_tag_ids_selection = fields.Selection(
[('add', 'Add'),
('remove_m2m', 'Remove'),
('set', 'Set'),
], string='Global Tags:', default=False, readonly=False, required=False
)
category_ids = fields.Many2many(
comodel_name='clv.address.category',
relation='clv_address_aux_mass_edit_category_rel',
column1='address_aux_id',
column2='category_id',
string='Categories'
)
category_ids_selection = fields.Selection(
[('add', 'Add'),
('remove_m2m', 'Remove'),
('set', 'Set'),
], string='Categories:', default=False, readonly=False, required=False
)
marker_ids = fields.Many2many(
comodel_name='clv.address.marker',
relation='clv_address_aux_mass_edit_marker_rel',
column1='address_aux_id',
column2='marker_id',
string='Markers'
)
marker_ids_selection = fields.Selection(
[('add', 'Add'),
('remove_m2m', 'Remove'),
('set', 'Set'),
], string='Markers:', default=False, readonly=False, required=False
)
partner_entity_code_selection = fields.Selection(
[('set', 'Set'),
('remove', 'Remove'),
], string='Partner Entity Code:', default=False, readonly=False, required=False
)
@api.multi
def _reopen_form(self):
self.ensure_one()
action = {
'type': 'ir.actions.act_window',
'res_model': self._name,
'res_id': self.id,
'view_type': 'form',
'view_mode': 'form',
'target': 'new',
}
return action
@api.model
def default_get(self, field_names):
defaults = super().default_get(field_names)
defaults['address_aux_ids'] = self.env.context['active_ids']
return defaults
@api.multi
def do_address_aux_mass_edit(self):
self.ensure_one()
for address_aux in self.address_aux_ids:
_logger.info(u'%s %s', '>>>>>', address_aux.name)
if self.global_tag_ids_selection == 'add':
m2m_list = []
for global_tag_id in self.global_tag_ids:
m2m_list.append((4, global_tag_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.global_tag_ids = m2m_list
if self.global_tag_ids_selection == 'remove_m2m':
m2m_list = []
for global_tag_id in self.global_tag_ids:
m2m_list.append((3, global_tag_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.global_tag_ids = m2m_list
if self.global_tag_ids_selection == 'set':
m2m_list = []
for global_tag_id in address_aux.global_tag_ids:
m2m_list.append((3, global_tag_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.global_tag_ids = m2m_list
m2m_list = []
for global_tag_id in self.global_tag_ids:
m2m_list.append((4, global_tag_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.global_tag_ids = m2m_list
if self.category_ids_selection == 'add':
m2m_list = []
for category_id in self.category_ids:
m2m_list.append((4, category_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.category_ids = m2m_list
if self.category_ids_selection == 'remove_m2m':
m2m_list = []
for category_id in self.category_ids:
m2m_list.append((3, category_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.category_ids = m2m_list
if self.category_ids_selection == 'set':
m2m_list = []
for category_id in address_aux.category_ids:
m2m_list.append((3, category_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.category_ids = m2m_list
m2m_list = []
for category_id in self.category_ids:
m2m_list.append((4, category_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.category_ids = m2m_list
if self.marker_ids_selection == 'add':
m2m_list = []
for marker_id in self.marker_ids:
m2m_list.append((4, marker_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.marker_ids = m2m_list
if self.marker_ids_selection == 'remove_m2m':
m2m_list = []
for marker_id in self.marker_ids:
m2m_list.append((3, marker_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.marker_ids = m2m_list
if self.marker_ids_selection == 'set':
m2m_list = []
for marker_id in address_aux.marker_ids:
m2m_list.append((3, marker_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.marker_ids = m2m_list
m2m_list = []
for marker_id in self.marker_ids:
m2m_list.append((4, marker_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.marker_ids = m2m_list
if self.partner_entity_code_selection == 'set':
if address_aux.entity_code != address_aux.code:
vals = {}
vals['entity_code'] = address_aux.code
address_aux.write(vals)
if self.partner_entity_code_selection == 'remove':
if address_aux.entity_code is not False:
vals = {}
vals['entity_code'] = False
address_aux.write(vals)
return True | |
9,739 | [
0.0429522767663002,
-0.0006029015639796853,
0.0446646623313427,
0.002629221649840474,
-0.016553036868572235,
0.028425561264157295,
-0.0025257652159780264,
0.02307436242699623,
0.014883464202284813,
0.026984304189682007,
0.023516729474067688,
-0.04101157560944557,
0.04820358753204346,
-0.01... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ensure_one", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "name", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 4}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "global_tag_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "global_tag_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "global_tag_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "global_tag_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "global_tag_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "add"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 3}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "global_tag_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "global_tag_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "global_tag_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "global_tag_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "global_tag_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "remove_m2m"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 3}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "global_tag_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "global_tag_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "global_tag_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "global_tag_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 4}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "global_tag_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "global_tag_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "global_tag_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "global_tag_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "global_tag_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "set"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 4}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "category_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "category_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "category_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "category_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "category_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "add"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 3}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "category_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "category_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "category_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "category_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "category_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "remove_m2m"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 3}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "category_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "category_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "category_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "category_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 4}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "category_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "category_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "category_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "category_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "category_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "set"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 4}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "marker_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "marker_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "marker_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "marker_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "marker_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "add"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 3}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "marker_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "marker_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "marker_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "marker_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "marker_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "remove_m2m"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 3}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "marker_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "marker_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "marker_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "marker_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 4}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "marker_id", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "marker_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "marker_id", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": "u", "value": "%s %s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ">>>>>>>>>>"}}, {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "m2m_list", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "marker_ids", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "marker_ids_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "set"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [], "values": []}}, "targets": [{"_type": "Name", "_fields": {"id": "vals", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "code", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "entity_code"}}, "value": {"_type": "Name", "_fields": {"id": "vals", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "vals", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "write", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "NotEq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "entity_code", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "code", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "orelse": []}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "partner_entity_code_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "set"}}]}}, "orelse": []}}, {"_type": "If", "_fields": {"body": [{"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [], "values": []}}, "targets": [{"_type": "Name", "_fields": {"id": "vals", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "entity_code"}}, "value": {"_type": "Name", "_fields": {"id": "vals", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "vals", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "write", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "IsNot", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "entity_code", "value": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": false}}]}}, "orelse": []}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "partner_entity_code_selection", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "remove"}}]}}, "orelse": []}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "address_aux_ids", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "address_aux", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}], "name": "do_address_aux_mass_edit", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def do_address_aux_mass_edit(self):
self.ensure_one()
for address_aux in self.address_aux_ids:
_logger.info(u'%s %s', '>>>>>', address_aux.name)
if self.global_tag_ids_selection == 'add':
m2m_list = []
for global_tag_id in self.global_tag_ids:
m2m_list.append((4, global_tag_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.global_tag_ids = m2m_list
if self.global_tag_ids_selection == 'remove_m2m':
m2m_list = []
for global_tag_id in self.global_tag_ids:
m2m_list.append((3, global_tag_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.global_tag_ids = m2m_list
if self.global_tag_ids_selection == 'set':
m2m_list = []
for global_tag_id in address_aux.global_tag_ids:
m2m_list.append((3, global_tag_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.global_tag_ids = m2m_list
m2m_list = []
for global_tag_id in self.global_tag_ids:
m2m_list.append((4, global_tag_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.global_tag_ids = m2m_list
if self.category_ids_selection == 'add':
m2m_list = []
for category_id in self.category_ids:
m2m_list.append((4, category_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.category_ids = m2m_list
if self.category_ids_selection == 'remove_m2m':
m2m_list = []
for category_id in self.category_ids:
m2m_list.append((3, category_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.category_ids = m2m_list
if self.category_ids_selection == 'set':
m2m_list = []
for category_id in address_aux.category_ids:
m2m_list.append((3, category_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.category_ids = m2m_list
m2m_list = []
for category_id in self.category_ids:
m2m_list.append((4, category_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.category_ids = m2m_list
if self.marker_ids_selection == 'add':
m2m_list = []
for marker_id in self.marker_ids:
m2m_list.append((4, marker_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.marker_ids = m2m_list
if self.marker_ids_selection == 'remove_m2m':
m2m_list = []
for marker_id in self.marker_ids:
m2m_list.append((3, marker_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.marker_ids = m2m_list
if self.marker_ids_selection == 'set':
m2m_list = []
for marker_id in address_aux.marker_ids:
m2m_list.append((3, marker_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.marker_ids = m2m_list
m2m_list = []
for marker_id in self.marker_ids:
m2m_list.append((4, marker_id.id))
_logger.info(u'%s %s', '>>>>>>>>>>', m2m_list)
address_aux.marker_ids = m2m_list
if self.partner_entity_code_selection == 'set':
if address_aux.entity_code != address_aux.code:
vals = {}
vals['entity_code'] = address_aux.code
address_aux.write(vals)
if self.partner_entity_code_selection == 'remove':
if address_aux.entity_code is not False:
vals = {}
vals['entity_code'] = False
address_aux.write(vals)
return True | |
9,740 | [
0.023368585854768753,
0.02100522071123123,
0.006819518748670816,
0.021038353443145752,
-0.0007123221876099706,
-0.014257487840950489,
-0.004146929830312729,
-0.0009973890846595168,
0.06599748134613037,
0.014975331723690033,
-0.0032496247440576553,
-0.031386349350214005,
-0.01716199517250061,... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "m", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 1}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "group", "value": {"_type": "Name", "_fields": {"id": "m", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "HTML_ENTITIES", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "unichr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "In", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Name", "_fields": {"id": "HTML_ENTITIES", "ctx": {"_type": "Load", "_fields": {}}}}]}}, "orelse": []}}, {"_type": "Try", "_fields": {"body": [{"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Slice", "_fields": {"step": null, "lower": {"_type": "Constant", "_fields": {"kind": null, "value": 2}}, "upper": null}}, "value": {"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": 16}}], "func": {"_type": "Name", "_fields": {"id": "int", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Name", "_fields": {"id": "unichr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "In", "_fields": {}}], "left": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Slice", "_fields": {"step": null, "lower": null, "upper": {"_type": "Constant", "_fields": {"kind": null, "value": 2}}}}, "value": {"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "#x"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "#X"}}]}}]}}, "orelse": [{"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Slice", "_fields": {"step": null, "lower": {"_type": "Constant", "_fields": {"kind": null, "value": 1}}, "upper": null}}, "value": {"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "int", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Name", "_fields": {"id": "unichr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "test": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "#"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "startswith", "value": {"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "orelse": []}}]}}], "orelse": [], "handlers": [{"_type": "ExceptHandler", "_fields": {"body": [{"_type": "Pass", "_fields": {}}], "name": null, "type": {"_type": "Name", "_fields": {"id": "ValueError", "ctx": {"_type": "Load", "_fields": {}}}}}}], "finalbody": []}}, {"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": "u", "value": ""}}}}], "name": "handle_match", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def handle_match(m):
name = m.group(1)
if name in HTML_ENTITIES:
return unichr(HTML_ENTITIES[name])
try:
if name[:2] in ('#x', '#X'):
return unichr(int(name[2:], 16))
elif name.startswith('#'):
return unichr(int(name[1:]))
except ValueError:
pass
return u'' | |
9,741 | [
-0.016982678323984146,
0.03272321820259094,
0.015506367199122906,
-0.0469161793589592,
-0.012034488841891289,
-0.030096402391791344,
0.019945485517382622,
-0.0160052590072155,
0.003958043642342091,
-0.04054258391261101,
-0.020077843219041824,
0.018245181068778038,
0.051558926701545715,
0.0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "name", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "text_type", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "getattr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "orig", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": {"_type": "arg", "_fields": {"arg": "kwargs", "annotation": null, "type_comment": null}}, "vararg": {"_type": "arg", "_fields": {"arg": "args", "annotation": null, "type_comment": null}}, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "args", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "list", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "args", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "enumerate", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "escape", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "_escape_argspec", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "args", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "kwargs", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "kwargs", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "iteritems", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "escape", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "_escape_argspec", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}, {"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Starred", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "value": {"_type": "Name", "_fields": {"id": "args", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "orig", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": null, "value": {"_type": "Name", "_fields": {"id": "kwargs", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "__class__", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "func", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "__name__", "value": {"_type": "Name", "_fields": {"id": "orig", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "__name__", "value": {"_type": "Name", "_fields": {"id": "func", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "__doc__", "value": {"_type": "Name", "_fields": {"id": "orig", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "__doc__", "value": {"_type": "Name", "_fields": {"id": "func", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "func", "ctx": {"_type": "Load", "_fields": {}}}}}}], "name": "make_simple_escaping_wrapper", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def make_simple_escaping_wrapper(name):
orig = getattr(text_type, name)
def func(self, *args, **kwargs):
args = _escape_argspec(list(args), enumerate(args), self.escape)
_escape_argspec(kwargs, iteritems(kwargs), self.escape)
return self.__class__(orig(self, *args, **kwargs))
func.__name__ = orig.__name__
func.__doc__ = orig.__doc__
return func | |
9,742 | [
0.009165354073047638,
0.027691282331943512,
-0.006242051720619202,
-0.05053709074854851,
0.0021812140475958586,
-0.008709839545190334,
0.006096887402236462,
0.03343777358531952,
-0.01680898852646351,
-0.0022675616201013327,
-0.009505738504230976,
-0.007313261739909649,
-0.00658243615180254,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "escape", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "escape", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "escape", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "name": "__init__", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "value", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "format_spec", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "format_spec", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "__html_format__", "value": {"_type": "Name", "_fields": {"id": "value", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "rv", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "test": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "value", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "__html_format__"}}], "func": {"_type": "Name", "_fields": {"id": "hasattr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "orelse": [{"_type": "If", "_fields": {"body": [{"_type": "If", "_fields": {"body": [{"_type": "Raise", "_fields": {"exc": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "No format specification allowed when formatting an object with its __html__ method."}}], "func": {"_type": "Name", "_fields": {"id": "ValueError", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "cause": null}}], "test": {"_type": "Name", "_fields": {"id": "format_spec", "ctx": {"_type": "Load", "_fields": {}}}}, "orelse": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "__html__", "value": {"_type": "Name", "_fields": {"id": "value", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "rv", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "test": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "value", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "__html__"}}], "func": {"_type": "Name", "_fields": {"id": "hasattr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "orelse": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "value", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "format_spec", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "format_field", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Formatter", "value": {"_type": "Name", "_fields": {"id": "string", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "rv", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}]}}]}}, {"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "rv", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "escape", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Name", "_fields": {"id": "text_type", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "format_field", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "EscapeFormatter", "bases": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Formatter", "value": {"_type": "Name", "_fields": {"id": "string", "ctx": {"_type": "Load", "_fields": {}}}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class EscapeFormatter(string.Formatter):
def __init__(self, escape):
self.escape = escape
def format_field(self, value, format_spec):
if hasattr(value, '__html_format__'):
rv = value.__html_format__(format_spec)
elif hasattr(value, '__html__'):
if format_spec:
raise ValueError('No format specification allowed '
'when formatting an object with '
'its __html__ method.')
rv = value.__html__()
else:
rv = string.Formatter.format_field(self, value, format_spec)
return text_type(self.escape(rv)) | |
9,743 | [
-0.0005129411001689732,
0.017296181991696358,
-0.015426583588123322,
-0.03627979755401611,
0.04283777251839638,
-0.04962585121393204,
0.003957316745072603,
-0.02749747782945633,
0.03323091194033623,
0.028705526143312454,
0.01077655702829361,
0.012502339668571949,
-0.0010870036203414202,
0.... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "value", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "format_spec", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "format_spec", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "__html_format__", "value": {"_type": "Name", "_fields": {"id": "value", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "rv", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "test": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "value", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "__html_format__"}}], "func": {"_type": "Name", "_fields": {"id": "hasattr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "orelse": [{"_type": "If", "_fields": {"body": [{"_type": "If", "_fields": {"body": [{"_type": "Raise", "_fields": {"exc": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "No format specification allowed when formatting an object with its __html__ method."}}], "func": {"_type": "Name", "_fields": {"id": "ValueError", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "cause": null}}], "test": {"_type": "Name", "_fields": {"id": "format_spec", "ctx": {"_type": "Load", "_fields": {}}}}, "orelse": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "__html__", "value": {"_type": "Name", "_fields": {"id": "value", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "rv", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "test": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "value", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "__html__"}}], "func": {"_type": "Name", "_fields": {"id": "hasattr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "orelse": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "value", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "format_spec", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "format_field", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Formatter", "value": {"_type": "Name", "_fields": {"id": "string", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "rv", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}]}}]}}, {"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "rv", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "escape", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Name", "_fields": {"id": "text_type", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "format_field", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def format_field(self, value, format_spec):
if hasattr(value, '__html_format__'):
rv = value.__html_format__(format_spec)
elif hasattr(value, '__html__'):
if format_spec:
raise ValueError('No format specification allowed '
'when formatting an object with '
'its __html__ method.')
rv = value.__html__()
else:
rv = string.Formatter.format_field(self, value, format_spec)
return text_type(self.escape(rv)) | |
9,744 | [
-0.027082253247499466,
-0.02282862737774849,
0.03601738065481186,
-0.018373647704720497,
0.04185668006539345,
0.00293852505274117,
-0.002549972850829363,
0.06403090059757233,
0.030756982043385506,
0.021456895396113396,
0.028894448652863503,
-0.006657300982624292,
-0.0401703305542469,
0.011... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "2011-01-01"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timestamp", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "2011-01-02"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timestamp", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "2011-01-03"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timestamp", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}]}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "2011-01-01"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timestamp", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "tz", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "US/Eastern"}}}}]}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "2011-01-02"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timestamp", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "tz", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "US/Eastern"}}}}]}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "2011-01-03"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timestamp", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "tz", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "US/Eastern"}}}}]}}]}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "1 days"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timedelta", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "2 days"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timedelta", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "3 days"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timedelta", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}]}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "2011-01-01"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timestamp", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "2011-01-02"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timestamp", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "2011-01-03"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timestamp", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "NaT", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "2011-01-01"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timestamp", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "tz", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "US/Eastern"}}}}]}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "2011-01-02"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timestamp", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "tz", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "US/Eastern"}}}}]}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "2011-01-03"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timestamp", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "tz", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "US/Eastern"}}}}]}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "NaT", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "1 days"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timedelta", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "2 days"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timedelta", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "3 days"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Timedelta", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "NaT", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "cases", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "case", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Series", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "XXX"}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.5}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "quantile", "value": {"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 1}}, "value": {"_type": "Name", "_fields": {"id": "case", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.5}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "quantile", "value": {"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 1}}, "value": {"_type": "Name", "_fields": {"id": "case", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Series", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "index", "value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.5}}]}}}}, {"_type": "keyword", "_fields": {"arg": "name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "XXX"}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "exp", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "exp", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assert_series_equal", "value": {"_type": "Name", "_fields": {"id": "tm", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Name", "_fields": {"id": "cases", "ctx": {"_type": "Load", "_fields": {}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "case", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}], "name": "test_quantile_box", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_quantile_box(self):
cases = [[pd.Timestamp('2011-01-01'), pd.Timestamp('2011-01-02'),
pd.Timestamp('2011-01-03')],
[pd.Timestamp('2011-01-01', tz='US/Eastern'),
pd.Timestamp('2011-01-02', tz='US/Eastern'),
pd.Timestamp('2011-01-03', tz='US/Eastern')],
[pd.Timedelta('1 days'), pd.Timedelta('2 days'),
pd.Timedelta('3 days')],
# NaT
[pd.Timestamp('2011-01-01'), pd.Timestamp('2011-01-02'),
pd.Timestamp('2011-01-03'), pd.NaT],
[pd.Timestamp('2011-01-01', tz='US/Eastern'),
pd.Timestamp('2011-01-02', tz='US/Eastern'),
pd.Timestamp('2011-01-03', tz='US/Eastern'), pd.NaT],
[pd.Timedelta('1 days'), pd.Timedelta('2 days'),
pd.Timedelta('3 days'), pd.NaT]]
for case in cases:
s = pd.Series(case, name='XXX')
res = s.quantile(0.5)
self.assertEqual(res, case[1])
res = s.quantile([0.5])
exp = pd.Series([case[1]], index=[0.5], name='XXX')
tm.assert_series_equal(res, exp) | |
9,745 | [
0.007139560300856829,
-0.022376803681254387,
0.03283579647541046,
-0.0007313413079828024,
0.0409705676138401,
-0.0318714901804924,
0.001593265449628234,
0.0700233206152916,
0.027890644967556,
0.02845933847129345,
0.006731585133820772,
-0.030066510662436485,
-0.04148980602622032,
0.03592651... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 1}}, {"_type": "Constant", "_fields": {"kind": null, "value": 2}}, {"_type": "Constant", "_fields": {"kind": null, "value": 3}}, {"_type": "Constant", "_fields": {"kind": null, "value": 4}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "nan", "value": {"_type": "Name", "_fields": {"id": "np", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Series", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.5}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "quantile", "value": {"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 2.5}}, "targets": [{"_type": "Name", "_fields": {"id": "expected", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "expected", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}], "func": {"_type": "Name", "_fields": {"id": "Series", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "nan", "value": {"_type": "Name", "_fields": {"id": "np", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "nan", "value": {"_type": "Name", "_fields": {"id": "np", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Name", "_fields": {"id": "Series", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "cases", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.5}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "quantile", "value": {"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "isnan", "value": {"_type": "Name", "_fields": {"id": "np", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertTrue", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.5}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "quantile", "value": {"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "nan", "value": {"_type": "Name", "_fields": {"id": "np", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Series", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "index", "value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.5}}]}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assert_series_equal", "value": {"_type": "Name", "_fields": {"id": "tm", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.2}}, {"_type": "Constant", "_fields": {"kind": null, "value": 0.3}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "quantile", "value": {"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "nan", "value": {"_type": "Name", "_fields": {"id": "np", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "nan", "value": {"_type": "Name", "_fields": {"id": "np", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Series", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "index", "value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.2}}, {"_type": "Constant", "_fields": {"kind": null, "value": 0.3}}]}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assert_series_equal", "value": {"_type": "Name", "_fields": {"id": "tm", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Name", "_fields": {"id": "cases", "ctx": {"_type": "Load", "_fields": {}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}], "name": "test_quantile_nan", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_quantile_nan(self):
# GH 13098
s = pd.Series([1, 2, 3, 4, np.nan])
result = s.quantile(0.5)
expected = 2.5
self.assertEqual(result, expected)
# all nan/empty
cases = [Series([]), Series([np.nan, np.nan])]
for s in cases:
res = s.quantile(0.5)
self.assertTrue(np.isnan(res))
res = s.quantile([0.5])
tm.assert_series_equal(res, pd.Series([np.nan], index=[0.5]))
res = s.quantile([0.2, 0.3])
tm.assert_series_equal(res, pd.Series([np.nan, np.nan],
index=[0.2, 0.3])) | |
9,746 | [
0.0007167573203332722,
-0.01370745338499546,
0.06568720191717148,
-0.034743644297122955,
0.06682229042053223,
-0.008920331485569477,
-0.008796952664852142,
0.05976498872041702,
0.02196153625845909,
0.0396047942340374,
0.005752565339207649,
-0.03536054119467735,
-0.03612549230456352,
0.0149... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}], "func": {"_type": "Name", "_fields": {"id": "Series", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "dtype", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "float64"}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.5}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "quantile", "value": {"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "isnan", "value": {"_type": "Name", "_fields": {"id": "np", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertTrue", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.5}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "quantile", "value": {"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "nan", "value": {"_type": "Name", "_fields": {"id": "np", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Name", "_fields": {"id": "Series", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "index", "value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.5}}]}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "exp", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "exp", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assert_series_equal", "value": {"_type": "Name", "_fields": {"id": "tm", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}], "func": {"_type": "Name", "_fields": {"id": "Series", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "dtype", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "int64"}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.5}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "quantile", "value": {"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "isnan", "value": {"_type": "Name", "_fields": {"id": "np", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertTrue", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.5}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "quantile", "value": {"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "nan", "value": {"_type": "Name", "_fields": {"id": "np", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Name", "_fields": {"id": "Series", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "index", "value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.5}}]}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "exp", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "exp", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assert_series_equal", "value": {"_type": "Name", "_fields": {"id": "tm", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}], "func": {"_type": "Name", "_fields": {"id": "Series", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "dtype", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "datetime64[ns]"}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.5}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "quantile", "value": {"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Compare", "_fields": {"ops": [{"_type": "Is", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "NaT", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertTrue", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.5}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "quantile", "value": {"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "NaT", "value": {"_type": "Name", "_fields": {"id": "pd", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "func": {"_type": "Name", "_fields": {"id": "Series", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "index", "value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.5}}]}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "exp", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "exp", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assert_series_equal", "value": {"_type": "Name", "_fields": {"id": "tm", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_quantile_empty", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_quantile_empty(self):
# floats
s = Series([], dtype='float64')
res = s.quantile(0.5)
self.assertTrue(np.isnan(res))
res = s.quantile([0.5])
exp = Series([np.nan], index=[0.5])
tm.assert_series_equal(res, exp)
# int
s = Series([], dtype='int64')
res = s.quantile(0.5)
self.assertTrue(np.isnan(res))
res = s.quantile([0.5])
exp = Series([np.nan], index=[0.5])
tm.assert_series_equal(res, exp)
# datetime
s = Series([], dtype='datetime64[ns]')
res = s.quantile(0.5)
self.assertTrue(res is pd.NaT)
res = s.quantile([0.5])
exp = Series([pd.NaT], index=[0.5])
tm.assert_series_equal(res, exp) | |
9,747 | [
-0.020548135042190552,
-0.031996555626392365,
-0.012216978706419468,
0.02938961237668991,
0.012665816582739353,
-0.0463593453168869,
-0.010360145941376686,
0.023314939811825752,
-0.0059301843866705894,
-0.00766712287440896,
0.0026991714257746935,
-0.05376208573579788,
-0.0017323270440101624,... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "offer", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Slice", "_fields": {"step": null, "lower": null, "upper": null}}, "value": {"_type": "Name", "_fields": {"id": "offer", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "offer", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "offer", "ctx": {"_type": "Load", "_fields": {}}}}}}], "test": {"_type": "BoolOp", "_fields": {"op": {"_type": "And", "_fields": {}}, "values": [{"_type": "Compare", "_fields": {"ops": [{"_type": "Lt", "_fields": {}}], "left": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "random", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.05}}]}}, {"_type": "Name", "_fields": {"id": "offer", "ctx": {"_type": "Load", "_fields": {}}}}]}}, "orelse": [{"_type": "Assign", "_fields": {"value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "preferences", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Name", "_fields": {"id": "ordering", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "ordering", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "shuffle", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Slice", "_fields": {"step": null, "lower": null, "upper": null}}, "value": {"_type": "Name", "_fields": {"id": "ordering", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "offer", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "offer", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}], "name": "make_offer", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "Negotiator", "bases": [{"_type": "Name", "_fields": {"id": "BaseNegotiator", "ctx": {"_type": "Load", "_fields": {}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class Negotiator(BaseNegotiator):
# Override the make_offer method from BaseNegotiator to accept a given offer 5%
# of the time, and return a random permutation the rest of the time.
def make_offer(self, offer):
if random() < 0.05 and offer:
# Very important - we save the offer we're going to return as self.offer
self.offer = offer[:]
return offer
else:
ordering = self.preferences
shuffle(ordering)
self.offer = ordering[:]
return self.offer | |
9,748 | [
0.03241763263940811,
0.018618950620293617,
0.052943501621484756,
-0.033238667994737625,
-0.020698022097349167,
-0.00276933703571558,
-0.000977461808361113,
0.0000037697145671700127,
-0.008415606804192066,
-0.0011959630064666271,
0.01804952323436737,
-0.04915614798665047,
-0.00328248389996588... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "orm", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditcourse"}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "primary_key", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "course_key"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "xmodule_django.models.CourseKeyField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "unique", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}, {"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 255}}}}, {"_type": "keyword", "_fields": {"arg": "db_index", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "enabled"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.BooleanField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}]}}]}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "create_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "CreditCourse"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "send_create_signal", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditprovider"}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "primary_key", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "created"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoCreatedField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "now", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "datetime", "value": {"_type": "Name", "_fields": {"id": "datetime", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "modified"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoLastModifiedField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "now", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "datetime", "value": {"_type": "Name", "_fields": {"id": "datetime", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "provider_id"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "unique", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}, {"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 255}}}}, {"_type": "keyword", "_fields": {"arg": "db_index", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "display_name"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 255}}}}]}}]}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "create_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "CreditProvider"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "send_create_signal", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditrequirement"}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "primary_key", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "created"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoCreatedField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "now", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "datetime", "value": {"_type": "Name", "_fields": {"id": "datetime", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "modified"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoLastModifiedField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "now", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "datetime", "value": {"_type": "Name", "_fields": {"id": "datetime", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "course"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "related_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "credit_requirements"}}}}, {"_type": "keyword", "_fields": {"arg": "to", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "credit.CreditCourse"}}, "value": {"_type": "Name", "_fields": {"id": "orm", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "namespace"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 255}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "name"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 255}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "configuration"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "jsonfield.fields.JSONField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": []}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "active"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.BooleanField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "create_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "CreditRequirement"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "send_create_signal", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditrequirement"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "namespace"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "course_id"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "create_unique", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditrequirementstatus"}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "primary_key", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "created"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoCreatedField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "now", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "datetime", "value": {"_type": "Name", "_fields": {"id": "datetime", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "modified"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoLastModifiedField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "now", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "datetime", "value": {"_type": "Name", "_fields": {"id": "datetime", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "username"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 255}}}}, {"_type": "keyword", "_fields": {"arg": "db_index", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "requirement"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "related_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "statuses"}}}}, {"_type": "keyword", "_fields": {"arg": "to", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "credit.CreditRequirement"}}, "value": {"_type": "Name", "_fields": {"id": "orm", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "status"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 32}}}}]}}]}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "create_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "CreditRequirementStatus"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "send_create_signal", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_crediteligibility"}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "primary_key", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "created"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoCreatedField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "now", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "datetime", "value": {"_type": "Name", "_fields": {"id": "datetime", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "modified"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoLastModifiedField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "now", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "datetime", "value": {"_type": "Name", "_fields": {"id": "datetime", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "username"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 255}}}}, {"_type": "keyword", "_fields": {"arg": "db_index", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "course"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "related_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "eligibilities"}}}}, {"_type": "keyword", "_fields": {"arg": "to", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "credit.CreditCourse"}}, "value": {"_type": "Name", "_fields": {"id": "orm", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "provider"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "related_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "eligibilities"}}}}, {"_type": "keyword", "_fields": {"arg": "to", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "credit.CreditProvider"}}, "value": {"_type": "Name", "_fields": {"id": "orm", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}]}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "create_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "CreditEligibility"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "send_create_signal", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_crediteligibility"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "username"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "course_id"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "create_unique", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "forwards", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "orm", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_crediteligibility"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "username"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "course_id"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "delete_unique", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditrequirement"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "namespace"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "course_id"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "delete_unique", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditcourse"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "delete_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditprovider"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "delete_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditrequirement"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "delete_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditrequirementstatus"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "delete_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_crediteligibility"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "delete_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "backwards", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit.creditcourse"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "credit.crediteligibility"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "credit.creditprovider"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "credit.creditrequirement"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "credit.creditrequirementstatus"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "course_key"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "enabled"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "id"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "CreditCourse"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "xmodule_django.models.CourseKeyField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "db_index"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "255"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.BooleanField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "False"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "course"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "created"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "modified"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "provider"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "username"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique_together"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "(('username', 'course'),)"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "CreditEligibility"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "related_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "'eligibilities'"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "orm['credit.CreditCourse']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoCreatedField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "datetime.datetime.now"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoLastModifiedField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "datetime.datetime.now"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "related_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "'eligibilities'"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "orm['credit.CreditProvider']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "db_index"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "255"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "created"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "display_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "modified"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "provider_id"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "CreditProvider"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoCreatedField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "datetime.datetime.now"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "255"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoLastModifiedField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "datetime.datetime.now"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "db_index"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "255"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "active"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "configuration"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "course"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "created"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "modified"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "namespace"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique_together"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "(('namespace', 'name', 'course'),)"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "CreditRequirement"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.BooleanField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "jsonfield.fields.JSONField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [], "values": []}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "related_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "'credit_requirements'"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "orm['credit.CreditCourse']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoCreatedField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "datetime.datetime.now"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoLastModifiedField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "datetime.datetime.now"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "255"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "255"}}]}}]}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "Meta"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "created"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "modified"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "requirement"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "status"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "username"}}], "values": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "object_name"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "CreditRequirementStatus"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoCreatedField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "datetime.datetime.now"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "primary_key"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoLastModifiedField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "default"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "datetime.datetime.now"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "related_name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "to"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "'statuses'"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "orm['credit.CreditRequirement']"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "32"}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "max_length"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "db_index"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "255"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "True"}}]}}]}}]}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit"}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "complete_apps", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "name": "Migration", "bases": [{"_type": "Name", "_fields": {"id": "SchemaMigration", "ctx": {"_type": "Load", "_fields": {}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'CreditCourse'
db.create_table('credit_creditcourse', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('course_key', self.gf('xmodule_django.models.CourseKeyField')(unique=True, max_length=255, db_index=True)),
('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)),
))
db.send_create_signal('credit', ['CreditCourse'])
# Adding model 'CreditProvider'
db.create_table('credit_creditprovider', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('provider_id', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255, db_index=True)),
('display_name', self.gf('django.db.models.fields.CharField')(max_length=255)),
))
db.send_create_signal('credit', ['CreditProvider'])
# Adding model 'CreditRequirement'
db.create_table('credit_creditrequirement', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('course', self.gf('django.db.models.fields.related.ForeignKey')(related_name='credit_requirements', to=orm['credit.CreditCourse'])),
('namespace', self.gf('django.db.models.fields.CharField')(max_length=255)),
('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
('configuration', self.gf('jsonfield.fields.JSONField')()),
('active', self.gf('django.db.models.fields.BooleanField')(default=True)),
))
db.send_create_signal('credit', ['CreditRequirement'])
# Adding unique constraint on 'CreditRequirement', fields ['namespace', 'name', 'course']
db.create_unique('credit_creditrequirement', ['namespace', 'name', 'course_id'])
# Adding model 'CreditRequirementStatus'
db.create_table('credit_creditrequirementstatus', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('username', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)),
('requirement', self.gf('django.db.models.fields.related.ForeignKey')(related_name='statuses', to=orm['credit.CreditRequirement'])),
('status', self.gf('django.db.models.fields.CharField')(max_length=32)),
))
db.send_create_signal('credit', ['CreditRequirementStatus'])
# Adding model 'CreditEligibility'
db.create_table('credit_crediteligibility', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('username', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)),
('course', self.gf('django.db.models.fields.related.ForeignKey')(related_name='eligibilities', to=orm['credit.CreditCourse'])),
('provider', self.gf('django.db.models.fields.related.ForeignKey')(related_name='eligibilities', to=orm['credit.CreditProvider'])),
))
db.send_create_signal('credit', ['CreditEligibility'])
# Adding unique constraint on 'CreditEligibility', fields ['username', 'course']
db.create_unique('credit_crediteligibility', ['username', 'course_id'])
def backwards(self, orm):
# Removing unique constraint on 'CreditEligibility', fields ['username', 'course']
db.delete_unique('credit_crediteligibility', ['username', 'course_id'])
# Removing unique constraint on 'CreditRequirement', fields ['namespace', 'name', 'course']
db.delete_unique('credit_creditrequirement', ['namespace', 'name', 'course_id'])
# Deleting model 'CreditCourse'
db.delete_table('credit_creditcourse')
# Deleting model 'CreditProvider'
db.delete_table('credit_creditprovider')
# Deleting model 'CreditRequirement'
db.delete_table('credit_creditrequirement')
# Deleting model 'CreditRequirementStatus'
db.delete_table('credit_creditrequirementstatus')
# Deleting model 'CreditEligibility'
db.delete_table('credit_crediteligibility')
models = {
'credit.creditcourse': {
'Meta': {'object_name': 'CreditCourse'},
'course_key': ('xmodule_django.models.CourseKeyField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'}),
'enabled': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
},
'credit.crediteligibility': {
'Meta': {'unique_together': "(('username', 'course'),)", 'object_name': 'CreditEligibility'},
'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditCourse']"}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'provider': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'eligibilities'", 'to': "orm['credit.CreditProvider']"}),
'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
},
'credit.creditprovider': {
'Meta': {'object_name': 'CreditProvider'},
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'display_name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'provider_id': ('django.db.models.fields.CharField', [], {'unique': 'True', 'max_length': '255', 'db_index': 'True'})
},
'credit.creditrequirement': {
'Meta': {'unique_together': "(('namespace', 'name', 'course'),)", 'object_name': 'CreditRequirement'},
'active': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'configuration': ('jsonfield.fields.JSONField', [], {}),
'course': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'credit_requirements'", 'to': "orm['credit.CreditCourse']"}),
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'namespace': ('django.db.models.fields.CharField', [], {'max_length': '255'})
},
'credit.creditrequirementstatus': {
'Meta': {'object_name': 'CreditRequirementStatus'},
'created': ('model_utils.fields.AutoCreatedField', [], {'default': 'datetime.datetime.now'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'modified': ('model_utils.fields.AutoLastModifiedField', [], {'default': 'datetime.datetime.now'}),
'requirement': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'statuses'", 'to': "orm['credit.CreditRequirement']"}),
'status': ('django.db.models.fields.CharField', [], {'max_length': '32'}),
'username': ('django.db.models.fields.CharField', [], {'max_length': '255', 'db_index': 'True'})
}
}
complete_apps = ['credit'] | |
9,749 | [
0.02395561710000038,
-0.07241006195545197,
-0.000178029018570669,
0.051251985132694244,
0.04060504585504532,
-0.03408650681376457,
0.015345718711614609,
0.015956832095980644,
-0.0008211826789192855,
0.010456817224621773,
0.022896355018019676,
-0.057960644364356995,
-0.009268542751669884,
-... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "offer", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Slice", "_fields": {"step": null, "lower": null, "upper": null}}, "value": {"_type": "Name", "_fields": {"id": "offer", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "offer", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "offer", "ctx": {"_type": "Load", "_fields": {}}}}}}], "test": {"_type": "BoolOp", "_fields": {"op": {"_type": "And", "_fields": {}}, "values": [{"_type": "Compare", "_fields": {"ops": [{"_type": "Lt", "_fields": {}}], "left": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "random", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": 0.05}}]}}, {"_type": "Name", "_fields": {"id": "offer", "ctx": {"_type": "Load", "_fields": {}}}}]}}, "orelse": [{"_type": "Assign", "_fields": {"value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "preferences", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Name", "_fields": {"id": "ordering", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "ordering", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "shuffle", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Slice", "_fields": {"step": null, "lower": null, "upper": null}}, "value": {"_type": "Name", "_fields": {"id": "ordering", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "offer", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "offer", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}], "name": "make_offer", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def make_offer(self, offer):
if random() < 0.05 and offer:
# Very important - we save the offer we're going to return as self.offer
self.offer = offer[:]
return offer
else:
ordering = self.preferences
shuffle(ordering)
self.offer = ordering[:]
return self.offer | |
9,750 | [
0.07344082742929459,
0.01574081741273403,
0.07495860010385513,
-0.007680686190724373,
-0.028348157182335854,
0.02248513139784336,
0.010030792094767094,
0.035520877689123154,
-0.015202250331640244,
-0.002541358582675457,
0.043697290122509,
-0.06320806592702866,
-0.001147512928582728,
0.0278... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "orm", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_crediteligibility"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "username"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "course_id"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "delete_unique", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditrequirement"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "namespace"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "course_id"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "delete_unique", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditcourse"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "delete_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditprovider"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "delete_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditrequirement"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "delete_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditrequirementstatus"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "delete_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_crediteligibility"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "delete_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "backwards", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def backwards(self, orm):
# Removing unique constraint on 'CreditEligibility', fields ['username', 'course']
db.delete_unique('credit_crediteligibility', ['username', 'course_id'])
# Removing unique constraint on 'CreditRequirement', fields ['namespace', 'name', 'course']
db.delete_unique('credit_creditrequirement', ['namespace', 'name', 'course_id'])
# Deleting model 'CreditCourse'
db.delete_table('credit_creditcourse')
# Deleting model 'CreditProvider'
db.delete_table('credit_creditprovider')
# Deleting model 'CreditRequirement'
db.delete_table('credit_creditrequirement')
# Deleting model 'CreditRequirementStatus'
db.delete_table('credit_creditrequirementstatus')
# Deleting model 'CreditEligibility'
db.delete_table('credit_crediteligibility') | |
9,751 | [
0.020959964022040367,
0.0032153790816664696,
0.05956912785768509,
-0.017624584957957268,
-0.012553824111819267,
0.0038707624189555645,
0.01110151968896389,
0.014572282321751118,
0.007446140982210636,
-0.013587668538093567,
0.01257228571921587,
-0.02609226293861866,
0.012676901184022427,
-0... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "orm", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditcourse"}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "primary_key", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "course_key"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "xmodule_django.models.CourseKeyField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "unique", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}, {"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 255}}}}, {"_type": "keyword", "_fields": {"arg": "db_index", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "enabled"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.BooleanField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}]}}]}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "create_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "CreditCourse"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "send_create_signal", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditprovider"}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "primary_key", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "created"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoCreatedField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "now", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "datetime", "value": {"_type": "Name", "_fields": {"id": "datetime", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "modified"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoLastModifiedField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "now", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "datetime", "value": {"_type": "Name", "_fields": {"id": "datetime", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "provider_id"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "unique", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}, {"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 255}}}}, {"_type": "keyword", "_fields": {"arg": "db_index", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "display_name"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 255}}}}]}}]}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "create_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "CreditProvider"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "send_create_signal", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditrequirement"}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "primary_key", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "created"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoCreatedField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "now", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "datetime", "value": {"_type": "Name", "_fields": {"id": "datetime", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "modified"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoLastModifiedField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "now", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "datetime", "value": {"_type": "Name", "_fields": {"id": "datetime", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "course"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "related_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "credit_requirements"}}}}, {"_type": "keyword", "_fields": {"arg": "to", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "credit.CreditCourse"}}, "value": {"_type": "Name", "_fields": {"id": "orm", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "namespace"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 255}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "name"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 255}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "configuration"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "jsonfield.fields.JSONField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": []}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "active"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.BooleanField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "create_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "CreditRequirement"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "send_create_signal", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditrequirement"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "namespace"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "name"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "course_id"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "create_unique", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_creditrequirementstatus"}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "primary_key", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "created"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoCreatedField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "now", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "datetime", "value": {"_type": "Name", "_fields": {"id": "datetime", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "modified"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoLastModifiedField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "now", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "datetime", "value": {"_type": "Name", "_fields": {"id": "datetime", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "username"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 255}}}}, {"_type": "keyword", "_fields": {"arg": "db_index", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "requirement"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "related_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "statuses"}}}}, {"_type": "keyword", "_fields": {"arg": "to", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "credit.CreditRequirement"}}, "value": {"_type": "Name", "_fields": {"id": "orm", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "status"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 32}}}}]}}]}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "create_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "CreditRequirementStatus"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "send_create_signal", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_crediteligibility"}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.AutoField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "primary_key", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "created"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoCreatedField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "now", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "datetime", "value": {"_type": "Name", "_fields": {"id": "datetime", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "modified"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "model_utils.fields.AutoLastModifiedField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "now", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "datetime", "value": {"_type": "Name", "_fields": {"id": "datetime", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "username"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.CharField"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 255}}}}, {"_type": "keyword", "_fields": {"arg": "db_index", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "course"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "related_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "eligibilities"}}}}, {"_type": "keyword", "_fields": {"arg": "to", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "credit.CreditCourse"}}, "value": {"_type": "Name", "_fields": {"id": "orm", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "provider"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "django.db.models.fields.related.ForeignKey"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gf", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "related_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "eligibilities"}}}}, {"_type": "keyword", "_fields": {"arg": "to", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "credit.CreditProvider"}}, "value": {"_type": "Name", "_fields": {"id": "orm", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}]}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "create_table", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "CreditEligibility"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "send_create_signal", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "credit_crediteligibility"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "username"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "course_id"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "create_unique", "value": {"_type": "Name", "_fields": {"id": "db", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "forwards", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def forwards(self, orm):
# Adding model 'CreditCourse'
db.create_table('credit_creditcourse', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('course_key', self.gf('xmodule_django.models.CourseKeyField')(unique=True, max_length=255, db_index=True)),
('enabled', self.gf('django.db.models.fields.BooleanField')(default=False)),
))
db.send_create_signal('credit', ['CreditCourse'])
# Adding model 'CreditProvider'
db.create_table('credit_creditprovider', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('provider_id', self.gf('django.db.models.fields.CharField')(unique=True, max_length=255, db_index=True)),
('display_name', self.gf('django.db.models.fields.CharField')(max_length=255)),
))
db.send_create_signal('credit', ['CreditProvider'])
# Adding model 'CreditRequirement'
db.create_table('credit_creditrequirement', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('course', self.gf('django.db.models.fields.related.ForeignKey')(related_name='credit_requirements', to=orm['credit.CreditCourse'])),
('namespace', self.gf('django.db.models.fields.CharField')(max_length=255)),
('name', self.gf('django.db.models.fields.CharField')(max_length=255)),
('configuration', self.gf('jsonfield.fields.JSONField')()),
('active', self.gf('django.db.models.fields.BooleanField')(default=True)),
))
db.send_create_signal('credit', ['CreditRequirement'])
# Adding unique constraint on 'CreditRequirement', fields ['namespace', 'name', 'course']
db.create_unique('credit_creditrequirement', ['namespace', 'name', 'course_id'])
# Adding model 'CreditRequirementStatus'
db.create_table('credit_creditrequirementstatus', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('username', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)),
('requirement', self.gf('django.db.models.fields.related.ForeignKey')(related_name='statuses', to=orm['credit.CreditRequirement'])),
('status', self.gf('django.db.models.fields.CharField')(max_length=32)),
))
db.send_create_signal('credit', ['CreditRequirementStatus'])
# Adding model 'CreditEligibility'
db.create_table('credit_crediteligibility', (
('id', self.gf('django.db.models.fields.AutoField')(primary_key=True)),
('created', self.gf('model_utils.fields.AutoCreatedField')(default=datetime.datetime.now)),
('modified', self.gf('model_utils.fields.AutoLastModifiedField')(default=datetime.datetime.now)),
('username', self.gf('django.db.models.fields.CharField')(max_length=255, db_index=True)),
('course', self.gf('django.db.models.fields.related.ForeignKey')(related_name='eligibilities', to=orm['credit.CreditCourse'])),
('provider', self.gf('django.db.models.fields.related.ForeignKey')(related_name='eligibilities', to=orm['credit.CreditProvider'])),
))
db.send_create_signal('credit', ['CreditEligibility'])
# Adding unique constraint on 'CreditEligibility', fields ['username', 'course']
db.create_unique('credit_crediteligibility', ['username', 'course_id']) | |
9,752 | [
0.0023521052207797766,
-0.01168789528310299,
-0.010458767414093018,
-0.04701975733041763,
0.023800399154424667,
0.0031733866780996323,
-0.03381220996379852,
-0.05805956572294235,
0.05157870426774025,
-0.011933721601963043,
0.002233382547274232,
-0.035912901163101196,
0.009492225013673306,
... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "FooBar"}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "bar"}}], "func": {"_type": "Name", "_fields": {"id": "JsFunctionNameToClassName", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEquals", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "FooBar"}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "experimental.foo"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "bar"}}], "func": {"_type": "Name", "_fields": {"id": "JsFunctionNameToClassName", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEquals", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "FooBarBaz"}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo.bar"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "baz"}}], "func": {"_type": "Name", "_fields": {"id": "JsFunctionNameToClassName", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEquals", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "FooBarBaz"}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "experimental.foo.bar"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "baz"}}], "func": {"_type": "Name", "_fields": {"id": "JsFunctionNameToClassName", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEquals", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "testJsFunctionNameToClassName", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def testJsFunctionNameToClassName(self):
self.assertEquals('FooBar', JsFunctionNameToClassName('foo', 'bar'))
self.assertEquals('FooBar',
JsFunctionNameToClassName('experimental.foo', 'bar'))
self.assertEquals('FooBarBaz',
JsFunctionNameToClassName('foo.bar', 'baz'))
self.assertEquals('FooBarBaz',
JsFunctionNameToClassName('experimental.foo.bar', 'baz')) | |
9,753 | [
0.0268683023750782,
0.0025084514636546373,
-0.009972487576305866,
-0.038596704602241516,
0.030636552721261978,
0.015318276360630989,
-0.03529669716954231,
-0.03081493265926838,
0.04869740456342697,
0.017715241760015488,
0.021817952394485474,
-0.04584334418177605,
-0.001774032600224018,
0.0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Bar"}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo.Bar"}}], "func": {"_type": "Name", "_fields": {"id": "StripNamespace", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEquals", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Baz"}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Baz"}}], "func": {"_type": "Name", "_fields": {"id": "StripNamespace", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEquals", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "testStripNamespace", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "FooBar"}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "bar"}}], "func": {"_type": "Name", "_fields": {"id": "JsFunctionNameToClassName", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEquals", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "FooBar"}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "experimental.foo"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "bar"}}], "func": {"_type": "Name", "_fields": {"id": "JsFunctionNameToClassName", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEquals", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "FooBarBaz"}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "foo.bar"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "baz"}}], "func": {"_type": "Name", "_fields": {"id": "JsFunctionNameToClassName", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEquals", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "FooBarBaz"}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "experimental.foo.bar"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "baz"}}], "func": {"_type": "Name", "_fields": {"id": "JsFunctionNameToClassName", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEquals", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "testJsFunctionNameToClassName", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "SchemaUtilTest", "bases": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "TestCase", "value": {"_type": "Name", "_fields": {"id": "unittest", "ctx": {"_type": "Load", "_fields": {}}}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class SchemaUtilTest(unittest.TestCase):
def testStripNamespace(self):
self.assertEquals('Bar', StripNamespace('foo.Bar'))
self.assertEquals('Baz', StripNamespace('Baz'))
def testJsFunctionNameToClassName(self):
self.assertEquals('FooBar', JsFunctionNameToClassName('foo', 'bar'))
self.assertEquals('FooBar',
JsFunctionNameToClassName('experimental.foo', 'bar'))
self.assertEquals('FooBarBaz',
JsFunctionNameToClassName('foo.bar', 'baz'))
self.assertEquals('FooBarBaz',
JsFunctionNameToClassName('experimental.foo.bar', 'baz')) | |
9,754 | [
0.020856989547610283,
-0.026422599330544472,
0.0017085091676563025,
-0.0252841804176569,
-0.027251821011304855,
0.02612745389342308,
-0.0024156300351023674,
0.037469495087862015,
0.013169136829674244,
0.013871865347027779,
-0.0047328779473900795,
-0.021039698272943497,
0.03218497708439827,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "dut", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "speed", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": 1000000000.0}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "dut", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "cocotb.tb"}}], "func": {"_type": "Name", "_fields": {"id": "SimLog", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "log", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "DEBUG", "value": {"_type": "Name", "_fields": {"id": "logging", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setLevel", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "log", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "start", "value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "clk", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": 8}}], "func": {"_type": "Name", "_fields": {"id": "Clock", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "units", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "ns"}}}}]}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "start_soon", "value": {"_type": "Name", "_fields": {"id": "cocotb", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_txd", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_tx_er", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_tx_en", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_tx_clk", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_gtx_clk", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_rxd", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_rx_er", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_rx_dv", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_rx_clk", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "GmiiPhy", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "speed", "value": {"_type": "Name", "_fields": {"id": "speed", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "gmii_phy", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setimmediatevalue", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "btnu", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setimmediatevalue", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "btnl", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setimmediatevalue", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "btnd", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setimmediatevalue", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "btnr", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setimmediatevalue", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "btnc", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setimmediatevalue", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "sw", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setimmediatevalue", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "uart_rxd", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}], "name": "__init__", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "AsyncFunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setimmediatevalue", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "rst", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dut", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": []}}}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Await", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "clk", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dut", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "RisingEdge", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}}}], "iter": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 10}}], "func": {"_type": "Name", "_fields": {"id": "range", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "k", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Compare", "_fields": {"ops": [{"_type": "LtE", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "rst", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dut", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": 1}}]}}}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Await", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "clk", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dut", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "RisingEdge", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}}}], "iter": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 10}}], "func": {"_type": "Name", "_fields": {"id": "range", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "k", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Compare", "_fields": {"ops": [{"_type": "LtE", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "rst", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dut", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}]}}}}], "name": "init", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "TB", "bases": [], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class TB:
def __init__(self, dut, speed=1000e6):
self.dut = dut
self.log = SimLog("cocotb.tb")
self.log.setLevel(logging.DEBUG)
cocotb.start_soon(Clock(dut.clk, 8, units="ns").start())
# Ethernet
self.gmii_phy = GmiiPhy(dut.phy_txd, dut.phy_tx_er, dut.phy_tx_en, dut.phy_tx_clk, dut.phy_gtx_clk,
dut.phy_rxd, dut.phy_rx_er, dut.phy_rx_dv, dut.phy_rx_clk, speed=speed)
dut.btnu.setimmediatevalue(0)
dut.btnl.setimmediatevalue(0)
dut.btnd.setimmediatevalue(0)
dut.btnr.setimmediatevalue(0)
dut.btnc.setimmediatevalue(0)
dut.sw.setimmediatevalue(0)
dut.uart_rxd.setimmediatevalue(0)
async def init(self):
self.dut.rst.setimmediatevalue(0)
for k in range(10):
await RisingEdge(self.dut.clk)
self.dut.rst <= 1
for k in range(10):
await RisingEdge(self.dut.clk)
self.dut.rst <= 0 | |
9,755 | [
0.02339067868888378,
-0.011333908885717392,
-0.012363644316792488,
-0.02304970659315586,
-0.020485596731305122,
0.012084047310054302,
0.0026953835040330887,
0.03385169804096222,
0.04069841653108597,
0.007228606380522251,
-0.0024805711582303047,
-0.014416296035051346,
0.007521842140704393,
... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "dut", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "speed", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": 1000000000.0}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "dut", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "cocotb.tb"}}], "func": {"_type": "Name", "_fields": {"id": "SimLog", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "log", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "DEBUG", "value": {"_type": "Name", "_fields": {"id": "logging", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setLevel", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "log", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "start", "value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "clk", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": 8}}], "func": {"_type": "Name", "_fields": {"id": "Clock", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "units", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "ns"}}}}]}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "start_soon", "value": {"_type": "Name", "_fields": {"id": "cocotb", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_txd", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_tx_er", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_tx_en", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_tx_clk", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_gtx_clk", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_rxd", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_rx_er", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_rx_dv", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "phy_rx_clk", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "GmiiPhy", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "speed", "value": {"_type": "Name", "_fields": {"id": "speed", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "gmii_phy", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setimmediatevalue", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "btnu", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setimmediatevalue", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "btnl", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setimmediatevalue", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "btnd", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setimmediatevalue", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "btnr", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setimmediatevalue", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "btnc", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setimmediatevalue", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "sw", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setimmediatevalue", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "uart_rxd", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}], "name": "__init__", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def __init__(self, dut, speed=1000e6):
self.dut = dut
self.log = SimLog("cocotb.tb")
self.log.setLevel(logging.DEBUG)
cocotb.start_soon(Clock(dut.clk, 8, units="ns").start())
# Ethernet
self.gmii_phy = GmiiPhy(dut.phy_txd, dut.phy_tx_er, dut.phy_tx_en, dut.phy_tx_clk, dut.phy_gtx_clk,
dut.phy_rxd, dut.phy_rx_er, dut.phy_rx_dv, dut.phy_rx_clk, speed=speed)
dut.btnu.setimmediatevalue(0)
dut.btnl.setimmediatevalue(0)
dut.btnd.setimmediatevalue(0)
dut.btnr.setimmediatevalue(0)
dut.btnc.setimmediatevalue(0)
dut.sw.setimmediatevalue(0)
dut.uart_rxd.setimmediatevalue(0) | |
9,756 | [
0.003124628681689501,
0.007454367820173502,
0.05452585220336914,
-0.021114695817232132,
-0.0015686284750699997,
0.04295101389288902,
0.015529331751167774,
0.040901605039834976,
0.010340861044824123,
0.041738688945770264,
0.012325325049459934,
-0.009388318285346031,
-0.04121911898255348,
-0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "AsyncFunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setimmediatevalue", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "rst", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dut", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": []}}}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Await", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "clk", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dut", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "RisingEdge", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}}}], "iter": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 10}}], "func": {"_type": "Name", "_fields": {"id": "range", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "k", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Compare", "_fields": {"ops": [{"_type": "LtE", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "rst", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dut", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": 1}}]}}}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Await", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "clk", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dut", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Name", "_fields": {"id": "RisingEdge", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}}}], "iter": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 10}}], "func": {"_type": "Name", "_fields": {"id": "range", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "k", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Compare", "_fields": {"ops": [{"_type": "LtE", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "rst", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dut", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}]}}}}], "name": "init", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | async def init(self):
self.dut.rst.setimmediatevalue(0)
for k in range(10):
await RisingEdge(self.dut.clk)
self.dut.rst <= 1
for k in range(10):
await RisingEdge(self.dut.clk)
self.dut.rst <= 0 | |
9,757 | [
-0.013513489626348019,
0.0020647384226322174,
0.0362064354121685,
-0.0432891920208931,
-0.005912950728088617,
0.019087644293904305,
0.0007954516913741827,
0.04546260088682175,
0.02278243936598301,
0.02251395955681801,
0.004129476845264435,
0.017195500433444977,
0.02175965905189514,
-0.0251... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "AsyncFunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "dut", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "TB", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "tb", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Await", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "init", "value": {"_type": "Name", "_fields": {"id": "tb", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "test UDP RX packet"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "log", "value": {"_type": "Name", "_fields": {"id": "tb", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "ListComp", "_fields": {"elt": {"_type": "BinOp", "_fields": {"op": {"_type": "Mod", "_fields": {}}, "left": {"_type": "Name", "_fields": {"id": "x", "ctx": {"_type": "Load", "_fields": {}}}}, "right": {"_type": "Constant", "_fields": {"kind": null, "value": 256}}}}, "generators": [{"_type": "comprehension", "_fields": {"ifs": [], "iter": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 256}}], "func": {"_type": "Name", "_fields": {"id": "range", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "target": {"_type": "Name", "_fields": {"id": "x", "ctx": {"_type": "Store", "_fields": {}}}}, "is_async": 0}}]}}], "func": {"_type": "Name", "_fields": {"id": "bytes", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "payload", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "Ether", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "src", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "5a:51:52:53:54:55"}}}}, {"_type": "keyword", "_fields": {"arg": "dst", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "02:00:00:00:00:00"}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "eth", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "IP", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "src", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "192.168.1.100"}}}}, {"_type": "keyword", "_fields": {"arg": "dst", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "192.168.1.128"}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "ip", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "UDP", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "sport", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 5678}}}}, {"_type": "keyword", "_fields": {"arg": "dport", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 1234}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "udp", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "BinOp", "_fields": {"op": {"_type": "Div", "_fields": {}}, "left": {"_type": "BinOp", "_fields": {"op": {"_type": "Div", "_fields": {}}, "left": {"_type": "BinOp", "_fields": {"op": {"_type": "Div", "_fields": {}}, "left": {"_type": "Name", "_fields": {"id": "eth", "ctx": {"_type": "Load", "_fields": {}}}}, "right": {"_type": "Name", "_fields": {"id": "ip", "ctx": {"_type": "Load", "_fields": {}}}}}}, "right": {"_type": "Name", "_fields": {"id": "udp", "ctx": {"_type": "Load", "_fields": {}}}}}}, "right": {"_type": "Name", "_fields": {"id": "payload", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "build", "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "from_payload", "value": {"_type": "Name", "_fields": {"id": "GmiiFrame", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "test_frame", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Await", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "test_frame", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "send", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "rx", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gmii_phy", "value": {"_type": "Name", "_fields": {"id": "tb", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": []}}}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "receive ARP request"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "log", "value": {"_type": "Name", "_fields": {"id": "tb", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Await", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "recv", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "tx", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gmii_phy", "value": {"_type": "Name", "_fields": {"id": "tb", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": []}}}}, "targets": [{"_type": "Name", "_fields": {"id": "rx_frame", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_payload", "value": {"_type": "Name", "_fields": {"id": "rx_frame", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Name", "_fields": {"id": "bytes", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Name", "_fields": {"id": "Ether", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "RX packet: %s"}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "repr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "log", "value": {"_type": "Name", "_fields": {"id": "tb", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dst", "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "ff:ff:ff:ff:ff:ff"}}]}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "src", "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dst", "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "hwtype", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "ARP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": 1}}]}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ptype", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "ARP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": 2048}}]}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "hwlen", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "ARP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": 6}}]}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "plen", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "ARP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": 4}}]}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "op", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "ARP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": 1}}]}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "hwsrc", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "ARP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dst", "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "psrc", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "ARP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dst", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "IP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "hwdst", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "ARP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "00:00:00:00:00:00"}}]}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "pdst", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "ARP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "src", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "IP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "send ARP response"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "log", "value": {"_type": "Name", "_fields": {"id": "tb", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "Ether", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "src", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "src", "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "keyword", "_fields": {"arg": "dst", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dst", "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "eth", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "ARP", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "hwtype", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 1}}}}, {"_type": "keyword", "_fields": {"arg": "ptype", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 2048}}}}, {"_type": "keyword", "_fields": {"arg": "hwlen", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 6}}}}, {"_type": "keyword", "_fields": {"arg": "plen", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 4}}}}, {"_type": "keyword", "_fields": {"arg": "op", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 2}}}}, {"_type": "keyword", "_fields": {"arg": "hwsrc", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "src", "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "keyword", "_fields": {"arg": "psrc", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "src", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "IP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, {"_type": "keyword", "_fields": {"arg": "hwdst", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dst", "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "keyword", "_fields": {"arg": "pdst", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dst", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "IP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "arp", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "BinOp", "_fields": {"op": {"_type": "Div", "_fields": {}}, "left": {"_type": "Name", "_fields": {"id": "eth", "ctx": {"_type": "Load", "_fields": {}}}}, "right": {"_type": "Name", "_fields": {"id": "arp", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Name", "_fields": {"id": "resp_pkt", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "build", "value": {"_type": "Name", "_fields": {"id": "resp_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "from_payload", "value": {"_type": "Name", "_fields": {"id": "GmiiFrame", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "resp_frame", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Await", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "resp_frame", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "send", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "rx", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gmii_phy", "value": {"_type": "Name", "_fields": {"id": "tb", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": []}}}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "receive UDP packet"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "log", "value": {"_type": "Name", "_fields": {"id": "tb", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Await", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "recv", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "tx", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gmii_phy", "value": {"_type": "Name", "_fields": {"id": "tb", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": []}}}}, "targets": [{"_type": "Name", "_fields": {"id": "rx_frame", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_payload", "value": {"_type": "Name", "_fields": {"id": "rx_frame", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Name", "_fields": {"id": "bytes", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Name", "_fields": {"id": "Ether", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "RX packet: %s"}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "repr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "log", "value": {"_type": "Name", "_fields": {"id": "tb", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dst", "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "src", "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "src", "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}, "comparators": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dst", "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dst", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "IP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "src", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "IP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "src", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "IP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dst", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "IP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dport", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "UDP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "sport", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "UDP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "sport", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "UDP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dport", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "UDP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}}}, {"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "payload", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "UDP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "rx_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "comparators": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "payload", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "UDP", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "test_pkt", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Await", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "clk", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "RisingEdge", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Await", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "clk", "value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "RisingEdge", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}}}], "name": "run_test", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | async def run_test(dut):
tb = TB(dut)
await tb.init()
tb.log.info("test UDP RX packet")
payload = bytes([x % 256 for x in range(256)])
eth = Ether(src='5a:51:52:53:54:55', dst='02:00:00:00:00:00')
ip = IP(src='192.168.1.100', dst='192.168.1.128')
udp = UDP(sport=5678, dport=1234)
test_pkt = eth / ip / udp / payload
test_frame = GmiiFrame.from_payload(test_pkt.build())
await tb.gmii_phy.rx.send(test_frame)
tb.log.info("receive ARP request")
rx_frame = await tb.gmii_phy.tx.recv()
rx_pkt = Ether(bytes(rx_frame.get_payload()))
tb.log.info("RX packet: %s", repr(rx_pkt))
assert rx_pkt.dst == 'ff:ff:ff:ff:ff:ff'
assert rx_pkt.src == test_pkt.dst
assert rx_pkt[ARP].hwtype == 1
assert rx_pkt[ARP].ptype == 0x0800
assert rx_pkt[ARP].hwlen == 6
assert rx_pkt[ARP].plen == 4
assert rx_pkt[ARP].op == 1
assert rx_pkt[ARP].hwsrc == test_pkt.dst
assert rx_pkt[ARP].psrc == test_pkt[IP].dst
assert rx_pkt[ARP].hwdst == '00:00:00:00:00:00'
assert rx_pkt[ARP].pdst == test_pkt[IP].src
tb.log.info("send ARP response")
eth = Ether(src=test_pkt.src, dst=test_pkt.dst)
arp = ARP(hwtype=1, ptype=0x0800, hwlen=6, plen=4, op=2,
hwsrc=test_pkt.src, psrc=test_pkt[IP].src,
hwdst=test_pkt.dst, pdst=test_pkt[IP].dst)
resp_pkt = eth / arp
resp_frame = GmiiFrame.from_payload(resp_pkt.build())
await tb.gmii_phy.rx.send(resp_frame)
tb.log.info("receive UDP packet")
rx_frame = await tb.gmii_phy.tx.recv()
rx_pkt = Ether(bytes(rx_frame.get_payload()))
tb.log.info("RX packet: %s", repr(rx_pkt))
assert rx_pkt.dst == test_pkt.src
assert rx_pkt.src == test_pkt.dst
assert rx_pkt[IP].dst == test_pkt[IP].src
assert rx_pkt[IP].src == test_pkt[IP].dst
assert rx_pkt[UDP].dport == test_pkt[UDP].sport
assert rx_pkt[UDP].sport == test_pkt[UDP].dport
assert rx_pkt[UDP].payload == test_pkt[UDP].payload
await RisingEdge(dut.clk)
await RisingEdge(dut.clk) | |
9,758 | [
-0.01696600951254368,
0.008959125727415085,
0.014887170866131783,
-0.05286957323551178,
0.013572807423770428,
0.014256812632083893,
-0.060514338314533234,
0.03090093843638897,
0.011359849944710732,
0.0083086509257555,
0.014954229816794395,
-0.04042336344718933,
0.008570182137191296,
-0.050... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "request", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "fpga_core"}}, "targets": [{"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "__file__", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "basename", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "splitext", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, "targets": [{"_type": "Name", "_fields": {"id": "module", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Name", "_fields": {"id": "toplevel", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "JoinedStr", "_fields": {"values": [{"_type": "FormattedValue", "_fields": {"value": {"_type": "Name", "_fields": {"id": "dut", "ctx": {"_type": "Load", "_fields": {}}}}, "conversion": -1, "format_spec": null}}, {"_type": "Constant", "_fields": {"kind": null, "value": ".v"}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "iddr.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "oddr.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "ssio_sdr_in.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "ssio_sdr_out.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "gmii_phy_if.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "eth_mac_1g_gmii_fifo.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "eth_mac_1g_gmii.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "eth_mac_1g.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "axis_gmii_rx.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "axis_gmii_tx.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "lfsr.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "eth_axis_rx.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "eth_axis_tx.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "udp_complete.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "udp_checksum_gen.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "udp.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "udp_ip_rx.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "udp_ip_tx.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "ip_complete.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "ip.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "ip_eth_rx.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "ip_eth_tx.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "ip_arb_mux.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "arp.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "arp_cache.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "arp_eth_rx.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "arp_eth_tx.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "eth_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "eth_arb_mux.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "axis_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "arbiter.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "axis_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "priority_encoder.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "axis_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "axis_fifo.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "axis_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "axis_async_fifo.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "axis_rtl_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "axis_async_fifo_adapter.v"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "verilog_sources", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [], "values": []}}, "targets": [{"_type": "Name", "_fields": {"id": "parameters", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "DictComp", "_fields": {"key": {"_type": "JoinedStr", "_fields": {"values": [{"_type": "Constant", "_fields": {"kind": null, "value": "PARAM_"}}, {"_type": "FormattedValue", "_fields": {"value": {"_type": "Name", "_fields": {"id": "k", "ctx": {"_type": "Load", "_fields": {}}}}, "conversion": -1, "format_spec": null}}]}}, "value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "v", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "str", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "generators": [{"_type": "comprehension", "_fields": {"ifs": [], "iter": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "items", "value": {"_type": "Name", "_fields": {"id": "parameters", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "target": {"_type": "Tuple", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "k", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "v", "ctx": {"_type": "Store", "_fields": {}}}}]}}, "is_async": 0}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "extra_env", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "tests_dir", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "sim_build"}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "]"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ""}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "replace", "value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "["}}, {"_type": "Constant", "_fields": {"kind": null, "value": "-"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "replace", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "name", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "node", "value": {"_type": "Name", "_fields": {"id": "request", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": []}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "sim_build", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "run", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "simulator", "value": {"_type": "Name", "_fields": {"id": "cocotb_test", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "python_search", "value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "tests_dir", "ctx": {"_type": "Load", "_fields": {}}}}]}}}}, {"_type": "keyword", "_fields": {"arg": "verilog_sources", "value": {"_type": "Name", "_fields": {"id": "verilog_sources", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "keyword", "_fields": {"arg": "toplevel", "value": {"_type": "Name", "_fields": {"id": "toplevel", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "keyword", "_fields": {"arg": "module", "value": {"_type": "Name", "_fields": {"id": "module", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "keyword", "_fields": {"arg": "parameters", "value": {"_type": "Name", "_fields": {"id": "parameters", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "keyword", "_fields": {"arg": "sim_build", "value": {"_type": "Name", "_fields": {"id": "sim_build", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "keyword", "_fields": {"arg": "extra_env", "value": {"_type": "Name", "_fields": {"id": "extra_env", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}}}], "name": "test_fpga_core", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_fpga_core(request):
dut = "fpga_core"
module = os.path.splitext(os.path.basename(__file__))[0]
toplevel = dut
verilog_sources = [
os.path.join(rtl_dir, f"{dut}.v"),
os.path.join(eth_rtl_dir, "iddr.v"),
os.path.join(eth_rtl_dir, "oddr.v"),
os.path.join(eth_rtl_dir, "ssio_sdr_in.v"),
os.path.join(eth_rtl_dir, "ssio_sdr_out.v"),
os.path.join(eth_rtl_dir, "gmii_phy_if.v"),
os.path.join(eth_rtl_dir, "eth_mac_1g_gmii_fifo.v"),
os.path.join(eth_rtl_dir, "eth_mac_1g_gmii.v"),
os.path.join(eth_rtl_dir, "eth_mac_1g.v"),
os.path.join(eth_rtl_dir, "axis_gmii_rx.v"),
os.path.join(eth_rtl_dir, "axis_gmii_tx.v"),
os.path.join(eth_rtl_dir, "lfsr.v"),
os.path.join(eth_rtl_dir, "eth_axis_rx.v"),
os.path.join(eth_rtl_dir, "eth_axis_tx.v"),
os.path.join(eth_rtl_dir, "udp_complete.v"),
os.path.join(eth_rtl_dir, "udp_checksum_gen.v"),
os.path.join(eth_rtl_dir, "udp.v"),
os.path.join(eth_rtl_dir, "udp_ip_rx.v"),
os.path.join(eth_rtl_dir, "udp_ip_tx.v"),
os.path.join(eth_rtl_dir, "ip_complete.v"),
os.path.join(eth_rtl_dir, "ip.v"),
os.path.join(eth_rtl_dir, "ip_eth_rx.v"),
os.path.join(eth_rtl_dir, "ip_eth_tx.v"),
os.path.join(eth_rtl_dir, "ip_arb_mux.v"),
os.path.join(eth_rtl_dir, "arp.v"),
os.path.join(eth_rtl_dir, "arp_cache.v"),
os.path.join(eth_rtl_dir, "arp_eth_rx.v"),
os.path.join(eth_rtl_dir, "arp_eth_tx.v"),
os.path.join(eth_rtl_dir, "eth_arb_mux.v"),
os.path.join(axis_rtl_dir, "arbiter.v"),
os.path.join(axis_rtl_dir, "priority_encoder.v"),
os.path.join(axis_rtl_dir, "axis_fifo.v"),
os.path.join(axis_rtl_dir, "axis_async_fifo.v"),
os.path.join(axis_rtl_dir, "axis_async_fifo_adapter.v"),
]
parameters = {}
# parameters['A'] = val
extra_env = {f'PARAM_{k}': str(v) for k, v in parameters.items()}
sim_build = os.path.join(tests_dir, "sim_build",
request.node.name.replace('[', '-').replace(']', ''))
cocotb_test.simulator.run(
python_search=[tests_dir],
verilog_sources=verilog_sources,
toplevel=toplevel,
module=module,
parameters=parameters,
sim_build=sim_build,
extra_env=extra_env,
) | |
9,759 | [
-0.026262549683451653,
0.023972682654857635,
-0.0313691571354866,
-0.036597348749637604,
0.00386541779153049,
-0.024864312261343002,
-0.004303633701056242,
-0.014134358614683151,
-0.048634350299835205,
0.025654619559645653,
-0.045959461480379105,
-0.028451096266508102,
0.05588897690176964,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "type_", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "trans", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "trans", "ctx": {"_type": "Load", "_fields": {}}}}}}], "test": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "trans", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "str", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "isinstance", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "orelse": [{"_type": "If", "_fields": {"body": [{"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "type_", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Name", "_fields": {"id": "type_", "ctx": {"_type": "Load", "_fields": {}}}}, "value": {"_type": "Name", "_fields": {"id": "trans", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "_transform_type", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "In", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "type_", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Name", "_fields": {"id": "trans", "ctx": {"_type": "Load", "_fields": {}}}}]}}, "orelse": [{"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "type_", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": null}}, "value": {"_type": "Name", "_fields": {"id": "trans", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "_transform_type", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "In", "_fields": {}}], "left": {"_type": "Constant", "_fields": {"kind": null, "value": null}}, "comparators": [{"_type": "Name", "_fields": {"id": "trans", "ctx": {"_type": "Load", "_fields": {}}}}]}}, "orelse": [{"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "type_", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}]}}], "test": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "trans", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "dict", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "isinstance", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "orelse": [{"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "type_", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "trans", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "test": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "trans", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "callable", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "orelse": [{"_type": "Raise", "_fields": {"exc": {"_type": "Call", "_fields": {"args": [{"_type": "BinOp", "_fields": {"op": {"_type": "Mod", "_fields": {}}, "left": {"_type": "Constant", "_fields": {"kind": null, "value": "Invalid type transformation rule: %s"}}, "right": {"_type": "Name", "_fields": {"id": "trans", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "ValueError", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "cause": null}}]}}]}}]}}], "name": "_transform_type", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def _transform_type(type_, trans):
if isinstance(trans, str):
return trans
elif isinstance(trans, dict):
if type_ in trans:
return _transform_type(type_, trans[type_])
elif None in trans:
return _transform_type(type_, trans[None])
else:
return type_
elif callable(trans):
return trans(type_)
else:
raise ValueError("Invalid type transformation rule: %s" % trans) | |
9,760 | [
0.014202159829437733,
-0.009196382015943527,
0.05845106765627861,
-0.036423228681087494,
0.017861390486359596,
0.016617493703961372,
0.009498298168182373,
0.01932266727089882,
0.019878193736076355,
0.021049629896879196,
-0.00043400522554293275,
0.0033301408402621746,
-0.0245035570114851,
0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "float32", "value": {"_type": "Name", "_fields": {"id": "np", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "astype", "value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 2}}, {"_type": "Constant", "_fields": {"kind": null, "value": 2}}, {"_type": "Constant", "_fields": {"kind": null, "value": 3}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "randn", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "random", "value": {"_type": "Name", "_fields": {"id": "np", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "inputs", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "inputs", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "constant", "value": {"_type": "Name", "_fields": {"id": "constant_op", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "inputs_t", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}, {"_type": "Constant", "_fields": {"kind": null, "value": 1}}]}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 1}}, {"_type": "Constant", "_fields": {"kind": null, "value": 0}}]}}]}}], "func": {"_type": "Name", "_fields": {"id": "SimpleSparseTensorFrom", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "labels", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 2}}, {"_type": "Constant", "_fields": {"kind": null, "value": 2}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "array", "value": {"_type": "Name", "_fields": {"id": "np", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "dtype", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "int32", "value": {"_type": "Name", "_fields": {"id": "np", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "seq_lens", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 1.0}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "v", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "With", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ctc_loss", "value": {"_type": "Name", "_fields": {"id": "ctc_ops", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "inputs", "value": {"_type": "Name", "_fields": {"id": "inputs_t", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "keyword", "_fields": {"arg": "labels", "value": {"_type": "Name", "_fields": {"id": "labels", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "keyword", "_fields": {"arg": "sequence_length", "value": {"_type": "Name", "_fields": {"id": "seq_lens", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "loss", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "With", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "loss", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "inputs_t", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "Name", "_fields": {"id": "v", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_hessian_vector_product", "value": {"_type": "Name", "_fields": {"id": "gradients_impl", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "_", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "items": [{"_type": "withitem", "_fields": {"context_expr": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "LookupError", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "explicitly disabled"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertRaisesRegexp", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "optional_vars": null}}], "type_comment": null}}], "items": [{"_type": "withitem", "_fields": {"context_expr": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "test_session", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "use_gpu", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}]}}, "optional_vars": null}}], "type_comment": null}}], "name": "testInvalidSecondGradient", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def testInvalidSecondGradient(self):
inputs = np.random.randn(2, 2, 3).astype(np.float32)
inputs_t = constant_op.constant(inputs)
labels = SimpleSparseTensorFrom([[0, 1], [1, 0]])
seq_lens = np.array([2, 2], dtype=np.int32)
v = [1.0]
with self.test_session(use_gpu=False):
loss = ctc_ops.ctc_loss(
inputs=inputs_t, labels=labels, sequence_length=seq_lens)
# Taking ths second gradient should fail, since it is not
# yet supported.
with self.assertRaisesRegexp(LookupError,
"explicitly disabled"):
_ = gradients_impl._hessian_vector_product(loss, [inputs_t], v) | |
9,761 | [
0.01923244632780552,
0.03867584839463234,
0.038839928805828094,
-0.018236249685287476,
0.01903320662677288,
0.036402180790901184,
0.021810835227370262,
-0.0017404132522642612,
-0.014380384236574173,
0.03262835368514061,
0.002650174777954817,
0.0245415847748518,
0.01573989912867546,
0.03227... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "inputs", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "seq_lens", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "labels", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "loss_truth", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "grad_truth", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "expected_err_re", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "inputs", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "len", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "grad_truth", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "len", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEquals", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "inputs", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "constant", "value": {"_type": "Name", "_fields": {"id": "constant_op", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "inputs_t", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "With", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ctc_loss", "value": {"_type": "Name", "_fields": {"id": "ctc_ops", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "inputs", "value": {"_type": "Name", "_fields": {"id": "inputs_t", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "keyword", "_fields": {"arg": "labels", "value": {"_type": "Name", "_fields": {"id": "labels", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "keyword", "_fields": {"arg": "sequence_length", "value": {"_type": "Name", "_fields": {"id": "seq_lens", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "loss", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "loss", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "inputs_t", "ctx": {"_type": "Load", "_fields": {}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gradients", "value": {"_type": "Name", "_fields": {"id": "gradients_impl", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, "targets": [{"_type": "Name", "_fields": {"id": "grad", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "loss_truth", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "loss", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertShapeEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "grad_truth", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "grad", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertShapeEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "loss", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "grad", "ctx": {"_type": "Load", "_fields": {}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "run", "value": {"_type": "Name", "_fields": {"id": "sess", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "tf_loss", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "tf_grad", "ctx": {"_type": "Store", "_fields": {}}}}]}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "tf_loss", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "loss_truth", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertAllClose", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "atol", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 0.000001}}}}]}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "tf_grad", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "grad_truth", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertAllClose", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "atol", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 0.000001}}}}]}}}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Is", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "expected_err_re", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}]}}, "orelse": [{"_type": "With", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "loss", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "grad", "ctx": {"_type": "Load", "_fields": {}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "run", "value": {"_type": "Name", "_fields": {"id": "sess", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "items": [{"_type": "withitem", "_fields": {"context_expr": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "expected_err_re", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertRaisesOpError", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "optional_vars": null}}], "type_comment": null}}]}}], "items": [{"_type": "withitem", "_fields": {"context_expr": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "test_session", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "use_gpu", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}]}}, "optional_vars": {"_type": "Name", "_fields": {"id": "sess", "ctx": {"_type": "Store", "_fields": {}}}}}}], "type_comment": null}}], "name": "_testCTCLoss", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def _testCTCLoss(self,
inputs,
seq_lens,
labels,
loss_truth,
grad_truth,
expected_err_re=None):
self.assertEquals(len(inputs), len(grad_truth))
inputs_t = constant_op.constant(inputs)
with self.test_session(use_gpu=False) as sess:
loss = ctc_ops.ctc_loss(
inputs=inputs_t, labels=labels, sequence_length=seq_lens)
grad = gradients_impl.gradients(loss, [inputs_t])[0]
self.assertShapeEqual(loss_truth, loss)
self.assertShapeEqual(grad_truth, grad)
if expected_err_re is None:
(tf_loss, tf_grad) = sess.run([loss, grad])
self.assertAllClose(tf_loss, loss_truth, atol=1e-6)
self.assertAllClose(tf_grad, grad_truth, atol=1e-6)
else:
with self.assertRaisesOpError(expected_err_re):
sess.run([loss, grad]) | |
9,762 | [
0.0043181381188333035,
-0.027310898527503014,
0.043758705258369446,
-0.012123777531087399,
-0.0002847953583113849,
-0.014598017558455467,
0.006085452623665333,
0.02455388940870762,
0.018380070105195045,
0.030067909508943558,
0.002963197184726596,
0.003923438023775816,
0.014444850385189056,
... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "constant", "value": {"_type": "Name", "_fields": {"id": "constant_op", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "dtype", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "float32", "value": {"_type": "Name", "_fields": {"id": "dtypes", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "keyword", "_fields": {"arg": "shape", "value": {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 1}}, {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, {"_type": "Constant", "_fields": {"kind": null, "value": 2}}]}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "inputs", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "constant", "value": {"_type": "Name", "_fields": {"id": "constant_op", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "dtype", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "int32", "value": {"_type": "Name", "_fields": {"id": "dtypes", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "sequence_lengths", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "SparseTensor", "value": {"_type": "Name", "_fields": {"id": "sparse_tensor", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "indices", "value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "constant", "value": {"_type": "Name", "_fields": {"id": "constant_op", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "shape", "value": {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}, {"_type": "Constant", "_fields": {"kind": null, "value": 2}}]}}}}, {"_type": "keyword", "_fields": {"arg": "dtype", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "int64", "value": {"_type": "Name", "_fields": {"id": "dtypes", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}}}, {"_type": "keyword", "_fields": {"arg": "values", "value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "constant", "value": {"_type": "Name", "_fields": {"id": "constant_op", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "shape", "value": {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}]}}}}, {"_type": "keyword", "_fields": {"arg": "dtype", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "int32", "value": {"_type": "Name", "_fields": {"id": "dtypes", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}}}, {"_type": "keyword", "_fields": {"arg": "dense_shape", "value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 5}}, {"_type": "Constant", "_fields": {"kind": null, "value": 5}}]}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "labels", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "With", "_fields": {"body": [{"_type": "With", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "labels", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "inputs", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "sequence_lengths", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ctc_loss", "value": {"_type": "Name", "_fields": {"id": "ctc_ops", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "run", "value": {"_type": "Name", "_fields": {"id": "sess", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "items": [{"_type": "withitem", "_fields": {"context_expr": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "InvalidArgumentError", "value": {"_type": "Name", "_fields": {"id": "errors_impl", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "batch_size must not be 0"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertRaisesRegexp", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "optional_vars": null}}], "type_comment": null}}], "items": [{"_type": "withitem", "_fields": {"context_expr": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "test_session", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "use_gpu", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}]}}, "optional_vars": {"_type": "Name", "_fields": {"id": "sess", "ctx": {"_type": "Store", "_fields": {}}}}}}], "type_comment": null}}], "name": "testEmptyBatch", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def testEmptyBatch(self):
inputs = constant_op.constant([], dtype=dtypes.float32, shape=(1, 0, 2))
sequence_lengths = constant_op.constant([], dtype=dtypes.int32)
labels = sparse_tensor.SparseTensor(
indices=constant_op.constant([], shape=(0, 2), dtype=dtypes.int64),
values=constant_op.constant([], shape=(0,), dtype=dtypes.int32),
dense_shape=[5, 5])
with self.test_session(use_gpu=False) as sess:
with self.assertRaisesRegexp(errors_impl.InvalidArgumentError,
"batch_size must not be 0"):
sess.run(ctc_ops.ctc_loss(labels, inputs, sequence_lengths)) | |
9,763 | [
0.02926008403301239,
0.05501434952020645,
0.0738019347190857,
-0.02057419903576374,
-0.0010435984004288912,
-0.006977923214435577,
0.027507174760103226,
0.03287826478481293,
-0.029979225248098373,
0.0002821437956299633,
-0.02307995781302452,
0.007725156378000975,
0.00036624266067519784,
0.... | 15 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "users"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "0001_initial"}}]}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "dependencies", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "AlterModelManagers", "value": {"_type": "Name", "_fields": {"id": "migrations", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "user"}}}}, {"_type": "keyword", "_fields": {"arg": "managers", "value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "objects"}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "UserManager", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "models", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "auth", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "contrib", "value": {"_type": "Name", "_fields": {"id": "django", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}}}, "keywords": []}}]}}]}}}}]}}, {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "AlterField", "value": {"_type": "Name", "_fields": {"id": "migrations", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "model_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "user"}}}}, {"_type": "keyword", "_fields": {"arg": "name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "username"}}}}, {"_type": "keyword", "_fields": {"arg": "field", "value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "CharField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "error_messages", "value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "unique"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "A user with that username already exists."}}]}}}}, {"_type": "keyword", "_fields": {"arg": "help_text", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only."}}}}, {"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 30}}}}, {"_type": "keyword", "_fields": {"arg": "unique", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}, {"_type": "keyword", "_fields": {"arg": "validators", "value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "^[\\w.@+-]+$"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters."}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "RegexValidator", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "validators", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "core", "value": {"_type": "Name", "_fields": {"id": "django", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": []}}]}}}}, {"_type": "keyword", "_fields": {"arg": "verbose_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "username"}}}}]}}}}]}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "operations", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "name": "Migration", "bases": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Migration", "value": {"_type": "Name", "_fields": {"id": "migrations", "ctx": {"_type": "Load", "_fields": {}}}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class Migration(migrations.Migration):
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.AlterModelManagers(
name='user',
managers=[
('objects', django.contrib.auth.models.UserManager()),
],
),
migrations.AlterField(
model_name='user',
name='username',
field=models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=30, unique=True, validators=[django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.')], verbose_name='username'),
),
] | |
9,764 | [
-0.03618843853473663,
-0.03354229778051376,
0.025481363758444786,
-0.017653195187449455,
-0.026338910683989525,
-0.01158912107348442,
-0.020434094592928886,
-0.0008751562563702464,
-0.010168044827878475,
-0.0042816041968762875,
0.06399742513895035,
-0.028176508843898773,
-0.04875761270523071... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setUp", "value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "HostFiltersTestCase", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "super", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "StubOutForTesting", "value": {"_type": "Name", "_fields": {"id": "stubout", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "stubs", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "stubs", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "stub_out_https_backend", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "fake"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "fake"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "RequestContext", "value": {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "context", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "and"}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": ">="}}, {"_type": "Constant", "_fields": {"kind": null, "value": "$free_capacity_gb"}}, {"_type": "Constant", "_fields": {"kind": null, "value": 1024}}]}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": ">="}}, {"_type": "Constant", "_fields": {"kind": null, "value": "$total_capacity_gb"}}, {"_type": "BinOp", "_fields": {"op": {"_type": "Mult", "_fields": {}}, "left": {"_type": "Constant", "_fields": {"kind": null, "value": 10}}, "right": {"_type": "Constant", "_fields": {"kind": null, "value": 1024}}}}]}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dumps", "value": {"_type": "Name", "_fields": {"id": "jsonutils", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "json_query", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "manila.scheduler.filters"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "HostFilterHandler", "value": {"_type": "Name", "_fields": {"id": "filters", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "filter_handler", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get_all_classes", "value": {"_type": "Name", "_fields": {"id": "filter_handler", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "classes", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [], "values": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "class_map", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "cls", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "__name__", "value": {"_type": "Name", "_fields": {"id": "cls", "ctx": {"_type": "Load", "_fields": {}}}}}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "class_map", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "type_comment": null}}], "iter": {"_type": "Name", "_fields": {"id": "classes", "ctx": {"_type": "Load", "_fields": {}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "cls", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}], "name": "setUp", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def setUp(self):
super(HostFiltersTestCase, self).setUp()
self.stubs = stubout.StubOutForTesting()
stub_out_https_backend(self.stubs)
self.context = context.RequestContext('fake', 'fake')
self.json_query = jsonutils.dumps(
['and', ['>=', '$free_capacity_gb', 1024],
['>=', '$total_capacity_gb', 10 * 1024]])
# This has a side effect of testing 'get_filter_classes'
# when specifying a method (in this case, our standard filters)
filter_handler = filters.HostFilterHandler('manila.scheduler.filters')
classes = filter_handler.get_all_classes()
self.class_map = {}
for cls in classes:
self.class_map[cls.__name__] = cls | |
9,765 | [
0.004061592742800713,
0.0012754392810165882,
0.002765029901638627,
-0.048529334366321564,
0.017073841765522957,
-0.010873647406697273,
0.0031962464563548565,
-0.04470665752887726,
0.019894229248166084,
0.01687571406364441,
0.02227174863219261,
-0.01692233234643936,
-0.05267833545804024,
0.... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "f1name", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "f2name", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "f1name", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "fopen", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "f1", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "f2name", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "fopen", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "f2", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}}}], "test": {"_type": "BoolOp", "_fields": {"op": {"_type": "Or", "_fields": {}}, "values": [{"_type": "UnaryOp", "_fields": {"op": {"_type": "Not", "_fields": {}}, "operand": {"_type": "Name", "_fields": {"id": "f1", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "UnaryOp", "_fields": {"op": {"_type": "Not", "_fields": {}}, "operand": {"_type": "Name", "_fields": {"id": "f2", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "orelse": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "readlines", "value": {"_type": "Name", "_fields": {"id": "f1", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "a", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "close", "value": {"_type": "Name", "_fields": {"id": "f1", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "readlines", "value": {"_type": "Name", "_fields": {"id": "f2", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "b", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "close", "value": {"_type": "Name", "_fields": {"id": "f2", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "line", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "print", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "end", "value": {"_type": "Constant", "_fields": {"kind": null, "value": " "}}}}]}}}}], "iter": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "a", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "b", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ndiff", "value": {"_type": "Name", "_fields": {"id": "difflib", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "line", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 1}}}}], "name": "fcompare", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def fcompare(f1name, f2name):
f1 = fopen(f1name)
f2 = fopen(f2name)
if not f1 or not f2:
return 0
a = f1.readlines(); f1.close()
b = f2.readlines(); f2.close()
for line in difflib.ndiff(a, b):
print(line, end=' ')
return 1 | |
9,766 | [
0.019146403297781944,
0.021222811192274094,
0.028514379635453224,
-0.047781504690647125,
0.01132969744503498,
0.01388295367360115,
-0.052972521632909775,
0.004167904146015644,
0.007152738980948925,
0.019170548766851425,
0.05147557705640793,
-0.009259326383471489,
-0.02109001763164997,
0.01... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": true}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_stub_service_is_up", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "CapacityFilter"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "class_map", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "filt_cls", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "size"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 100}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "filter_properties", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "disabled"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": false}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "service", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "host1"}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "free_capacity_gb"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "updated_at"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "service"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 200}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "Name", "_fields": {"id": "service", "ctx": {"_type": "Load", "_fields": {}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "FakeHostState", "value": {"_type": "Name", "_fields": {"id": "fakes", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "host", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "host", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "filter_properties", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "host_passes", "value": {"_type": "Name", "_fields": {"id": "filt_cls", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertTrue", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_capacity_filter_passes", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_capacity_filter_passes(self):
self._stub_service_is_up(True)
filt_cls = self.class_map['CapacityFilter']()
filter_properties = {'size': 100}
service = {'disabled': False}
host = fakes.FakeHostState('host1',
{'free_capacity_gb': 200,
'updated_at': None,
'service': service})
self.assertTrue(filt_cls.host_passes(host, filter_properties)) | |
9,767 | [
0.006751917768269777,
0.02570551633834839,
0.03853416070342064,
-0.042971134185791016,
-0.004132535308599472,
0.014179027639329433,
-0.052568502724170685,
0.01288892887532711,
0.00408732146024704,
0.013118011876940727,
0.05208622291684151,
-0.017916696146130562,
-0.016903908923268318,
0.02... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": true}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_stub_service_is_up", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "CapacityFilter"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "class_map", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "filt_cls", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "size"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 100}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "filter_properties", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "disabled"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": false}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "service", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "host1"}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "free_capacity_gb"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "reserved_percentage"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "updated_at"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "service"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 120}}, {"_type": "Constant", "_fields": {"kind": null, "value": 20}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "Name", "_fields": {"id": "service", "ctx": {"_type": "Load", "_fields": {}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "FakeHostState", "value": {"_type": "Name", "_fields": {"id": "fakes", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "host", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "host", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "filter_properties", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "host_passes", "value": {"_type": "Name", "_fields": {"id": "filt_cls", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertFalse", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_capacity_filter_fails", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_capacity_filter_fails(self):
self._stub_service_is_up(True)
filt_cls = self.class_map['CapacityFilter']()
filter_properties = {'size': 100}
service = {'disabled': False}
host = fakes.FakeHostState('host1',
{'free_capacity_gb': 120,
'reserved_percentage': 20,
'updated_at': None,
'service': service})
self.assertFalse(filt_cls.host_passes(host, filter_properties)) | |
9,768 | [
0.007163308560848236,
0.014962789602577686,
0.012946121394634247,
-0.0430561900138855,
0.005547428969293833,
0.0034321534913033247,
-0.06000383943319321,
0.007220563944429159,
0.016171518713235855,
0.014224829152226448,
0.039111919701099396,
-0.002506521763280034,
-0.01222088374197483,
0.0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": true}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_stub_service_is_up", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "CapacityFilter"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "class_map", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "filt_cls", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "size"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 100}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "filter_properties", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "disabled"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": false}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "service", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "host1"}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "free_capacity_gb"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "updated_at"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "service"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "unknown"}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "Name", "_fields": {"id": "service", "ctx": {"_type": "Load", "_fields": {}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "FakeHostState", "value": {"_type": "Name", "_fields": {"id": "fakes", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "host", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "host", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "filter_properties", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "host_passes", "value": {"_type": "Name", "_fields": {"id": "filt_cls", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertTrue", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_capacity_filter_passes_unknown", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_capacity_filter_passes_unknown(self):
self._stub_service_is_up(True)
filt_cls = self.class_map['CapacityFilter']()
filter_properties = {'size': 100}
service = {'disabled': False}
host = fakes.FakeHostState('host1',
{'free_capacity_gb': 'unknown',
'updated_at': None,
'service': service})
self.assertTrue(filt_cls.host_passes(host, filter_properties)) | |
9,769 | [
0.020106205716729164,
0.008122415281832218,
0.030399106442928314,
-0.02882504276931286,
0.010913918726146221,
-0.0018522918689996004,
-0.051304642111063004,
-0.001132126897573471,
-0.0006544508505612612,
0.021483510732650757,
0.06886529177427292,
-0.028210174292325974,
-0.034358859062194824,... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": true}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_stub_service_is_up", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "CapacityFilter"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "class_map", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "filt_cls", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "size"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 100}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "filter_properties", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "disabled"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": false}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "service", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "host1"}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "free_capacity_gb"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "updated_at"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "service"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "infinite"}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "Name", "_fields": {"id": "service", "ctx": {"_type": "Load", "_fields": {}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "FakeHostState", "value": {"_type": "Name", "_fields": {"id": "fakes", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "host", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "host", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "filter_properties", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "host_passes", "value": {"_type": "Name", "_fields": {"id": "filt_cls", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertTrue", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_capacity_filter_passes_infinite", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_capacity_filter_passes_infinite(self):
self._stub_service_is_up(True)
filt_cls = self.class_map['CapacityFilter']()
filter_properties = {'size': 100}
service = {'disabled': False}
host = fakes.FakeHostState('host1',
{'free_capacity_gb': 'infinite',
'updated_at': None,
'service': service})
self.assertTrue(filt_cls.host_passes(host, filter_properties)) | |
9,770 | [
0.0247211791574955,
0.005521467421203852,
0.05685209482908249,
-0.011197304353117943,
0.007635778747498989,
0.01833689585328102,
0.009427567943930626,
-0.013286806643009186,
0.0011701761977747083,
0.030631326138973236,
0.03100622445344925,
-0.0027938128914684057,
0.026441296562552452,
0.01... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "executable", "value": {"_type": "Name", "_fields": {"id": "sys", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "replay.py"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "--host=127.0.0.1"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "--port=2"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "--ssl_port=1"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "--dns_port=0"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "--use_closest_match"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "--log_level=warning"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "--extra_arg"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "foo.wpr"}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "expected_cmd_line", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "replay.py"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "127.0.0.1"}}, {"_type": "Constant", "_fields": {"kind": null, "value": 2}}, {"_type": "Constant", "_fields": {"kind": null, "value": 1}}, {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "--extra_arg"}}]}}, {"_type": "Constant", "_fields": {"kind": null, "value": "foo.wpr"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_GetCommandLine", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ReplayServer", "value": {"_type": "Name", "_fields": {"id": "webpagereplay", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "cmd_line", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "expected_cmd_line", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "cmd_line", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "testHasDnsGivesDnsPort", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "executable", "value": {"_type": "Name", "_fields": {"id": "sys", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "replay.py"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "--host=127.0.0.1"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "--port=8080"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "--ssl_port=8443"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "--no-dns_forwarding"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "--use_closest_match"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "--log_level=warning"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "bar.wpr"}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "expected_cmd_line", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "replay.py"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "127.0.0.1"}}, {"_type": "Constant", "_fields": {"kind": null, "value": 8080}}, {"_type": "Constant", "_fields": {"kind": null, "value": 8443}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, {"_type": "Constant", "_fields": {"kind": null, "value": "bar.wpr"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_GetCommandLine", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ReplayServer", "value": {"_type": "Name", "_fields": {"id": "webpagereplay", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "cmd_line", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "expected_cmd_line", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "cmd_line", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "testNoDnsGivesNoDnsForwarding", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "CreateCommandTest", "bases": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "TestCase", "value": {"_type": "Name", "_fields": {"id": "unittest", "ctx": {"_type": "Load", "_fields": {}}}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class CreateCommandTest(unittest.TestCase):
def testHasDnsGivesDnsPort(self):
expected_cmd_line = [
sys.executable, 'replay.py', '--host=127.0.0.1',
'--port=2', '--ssl_port=1', '--dns_port=0',
'--use_closest_match', '--log_level=warning', '--extra_arg', 'foo.wpr']
cmd_line = webpagereplay.ReplayServer._GetCommandLine(
'replay.py', '127.0.0.1', 2, 1, 0, ['--extra_arg'], 'foo.wpr')
self.assertEqual(expected_cmd_line, cmd_line)
def testNoDnsGivesNoDnsForwarding(self):
expected_cmd_line = [
sys.executable, 'replay.py', '--host=127.0.0.1',
'--port=8080', '--ssl_port=8443', '--no-dns_forwarding',
'--use_closest_match', '--log_level=warning', 'bar.wpr']
cmd_line = webpagereplay.ReplayServer._GetCommandLine(
'replay.py', '127.0.0.1', 8080, 8443, None, [], 'bar.wpr')
self.assertEqual(expected_cmd_line, cmd_line) | |
9,771 | [
-0.008475803770124912,
-0.008810972794890404,
0.01523599587380886,
-0.031949009746313095,
0.04458318278193474,
0.027268001809716225,
-0.012895492836833,
-0.0436515249311924,
0.018621772527694702,
0.038629669696092606,
-0.002550694392994046,
-0.028767742216587067,
0.004271986894309521,
0.01... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}], "func": {"_type": "Name", "_fields": {"id": "iter", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "log_lines", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Dict", "_fields": {"keys": [], "values": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "log_lines", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_ParseLogFilePorts", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ReplayServer", "value": {"_type": "Name", "_fields": {"id": "webpagereplay", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "testEmptyLinesGivesEmptyDict", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "extra stuff"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2014-09-27 17:04:27,11 WARNING HTTP server started on 127.0.0.1:5167"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "extra stuff"}}]}}], "func": {"_type": "Name", "_fields": {"id": "iter", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "log_lines", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "http"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 5167}}]}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "log_lines", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_ParseLogFilePorts", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ReplayServer", "value": {"_type": "Name", "_fields": {"id": "webpagereplay", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "testSingleMatchGivesSingleElementDict", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "2014-09-27 17:04:27,11 WARNING FOO server started on 127.0.0.1:1111"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2014-09-27 17:04:27,12 WARNING HTTP server started on 127.0.0.1:5167"}}]}}], "func": {"_type": "Name", "_fields": {"id": "iter", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "log_lines", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "http"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 5167}}]}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "log_lines", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_ParseLogFilePorts", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ReplayServer", "value": {"_type": "Name", "_fields": {"id": "webpagereplay", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "testUnknownProtocolSkipped", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "extra"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2014-09-27 17:04:27,11 WARNING DNS server started on 127.0.0.1:2345"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2014-09-27 17:04:27,12 WARNING HTTP server started on 127.0.0.1:3456"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2014-09-27 17:04:27,13 WARNING HTTPS server started on 127.0.0.1:4567"}}]}}], "func": {"_type": "Name", "_fields": {"id": "iter", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "log_lines", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "dns"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "http"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "https"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 2345}}, {"_type": "Constant", "_fields": {"kind": null, "value": 3456}}, {"_type": "Constant", "_fields": {"kind": null, "value": 4567}}]}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "log_lines", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_ParseLogFilePorts", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ReplayServer", "value": {"_type": "Name", "_fields": {"id": "webpagereplay", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "testTypicalLogLinesGiveFullDict", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "ParseLogFilePortsTest", "bases": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "TestCase", "value": {"_type": "Name", "_fields": {"id": "unittest", "ctx": {"_type": "Load", "_fields": {}}}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class ParseLogFilePortsTest(unittest.TestCase):
def testEmptyLinesGivesEmptyDict(self):
log_lines = iter([])
self.assertEqual(
{},
webpagereplay.ReplayServer._ParseLogFilePorts(log_lines))
def testSingleMatchGivesSingleElementDict(self):
log_lines = iter([
'extra stuff',
'2014-09-27 17:04:27,11 WARNING HTTP server started on 127.0.0.1:5167',
'extra stuff',
])
self.assertEqual(
{'http': 5167},
webpagereplay.ReplayServer._ParseLogFilePorts(log_lines))
def testUnknownProtocolSkipped(self):
log_lines = iter([
'2014-09-27 17:04:27,11 WARNING FOO server started on 127.0.0.1:1111',
'2014-09-27 17:04:27,12 WARNING HTTP server started on 127.0.0.1:5167',
])
self.assertEqual(
{'http': 5167},
webpagereplay.ReplayServer._ParseLogFilePorts(log_lines))
def testTypicalLogLinesGiveFullDict(self):
log_lines = iter([
'extra',
'2014-09-27 17:04:27,11 WARNING DNS server started on 127.0.0.1:2345',
'2014-09-27 17:04:27,12 WARNING HTTP server started on 127.0.0.1:3456',
'2014-09-27 17:04:27,13 WARNING HTTPS server started on 127.0.0.1:4567',
])
self.assertEqual(
{'dns': 2345, 'http': 3456, 'https': 4567},
webpagereplay.ReplayServer._ParseLogFilePorts(log_lines)) | |
9,772 | [
0.020429221913218498,
-0.02456994354724884,
0.04435061663389206,
-0.03035697527229786,
0.015353096649050713,
0.015378040261566639,
0.019082240760326385,
-0.013532176613807678,
0.004115777090191841,
0.025255905464291573,
-0.008562063798308372,
-0.06300880759954453,
0.040160007774829865,
-0.... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "extra stuff"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2014-09-27 17:04:27,11 WARNING HTTP server started on 127.0.0.1:5167"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "extra stuff"}}]}}], "func": {"_type": "Name", "_fields": {"id": "iter", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "log_lines", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "http"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 5167}}]}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "log_lines", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_ParseLogFilePorts", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ReplayServer", "value": {"_type": "Name", "_fields": {"id": "webpagereplay", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "testSingleMatchGivesSingleElementDict", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def testSingleMatchGivesSingleElementDict(self):
log_lines = iter([
'extra stuff',
'2014-09-27 17:04:27,11 WARNING HTTP server started on 127.0.0.1:5167',
'extra stuff',
])
self.assertEqual(
{'http': 5167},
webpagereplay.ReplayServer._ParseLogFilePorts(log_lines)) | |
9,773 | [
-0.008630122989416122,
-0.03294792026281357,
0.03766563534736633,
-0.0325167290866375,
0.0113504184409976,
0.03621988371014595,
-0.0009456039988435805,
0.001582876080647111,
0.013658547773957253,
0.004521144088357687,
-0.015002843923866749,
-0.028357023373246193,
-0.00379192759282887,
0.01... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "2014-09-27 17:04:27,11 WARNING FOO server started on 127.0.0.1:1111"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2014-09-27 17:04:27,12 WARNING HTTP server started on 127.0.0.1:5167"}}]}}], "func": {"_type": "Name", "_fields": {"id": "iter", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "log_lines", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "http"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 5167}}]}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "log_lines", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_ParseLogFilePorts", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ReplayServer", "value": {"_type": "Name", "_fields": {"id": "webpagereplay", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "testUnknownProtocolSkipped", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def testUnknownProtocolSkipped(self):
log_lines = iter([
'2014-09-27 17:04:27,11 WARNING FOO server started on 127.0.0.1:1111',
'2014-09-27 17:04:27,12 WARNING HTTP server started on 127.0.0.1:5167',
])
self.assertEqual(
{'http': 5167},
webpagereplay.ReplayServer._ParseLogFilePorts(log_lines)) | |
9,774 | [
-0.002916287165135145,
0.02093343809247017,
0.020438434556126595,
-0.022874372079968452,
0.028423622250556946,
0.02868415042757988,
0.0020011819433420897,
-0.025401495397090912,
0.015905244275927544,
0.06877943128347397,
0.001388126634992659,
-0.008851444348692894,
0.01809368096292019,
-0.... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "extra"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2014-09-27 17:04:27,11 WARNING DNS server started on 127.0.0.1:2345"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2014-09-27 17:04:27,12 WARNING HTTP server started on 127.0.0.1:3456"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2014-09-27 17:04:27,13 WARNING HTTPS server started on 127.0.0.1:4567"}}]}}], "func": {"_type": "Name", "_fields": {"id": "iter", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "log_lines", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "dns"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "http"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "https"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 2345}}, {"_type": "Constant", "_fields": {"kind": null, "value": 3456}}, {"_type": "Constant", "_fields": {"kind": null, "value": 4567}}]}}, {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "log_lines", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_ParseLogFilePorts", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ReplayServer", "value": {"_type": "Name", "_fields": {"id": "webpagereplay", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEqual", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "testTypicalLogLinesGiveFullDict", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def testTypicalLogLinesGiveFullDict(self):
log_lines = iter([
'extra',
'2014-09-27 17:04:27,11 WARNING DNS server started on 127.0.0.1:2345',
'2014-09-27 17:04:27,12 WARNING HTTP server started on 127.0.0.1:3456',
'2014-09-27 17:04:27,13 WARNING HTTPS server started on 127.0.0.1:4567',
])
self.assertEqual(
{'dns': 2345, 'http': 3456, 'https': 4567},
webpagereplay.ReplayServer._ParseLogFilePorts(log_lines)) | |
9,775 | [
0.010343183763325214,
0.011021705344319344,
0.056015126407146454,
-0.005952747538685799,
-0.04269556701183319,
-0.02912512794137001,
-0.012065147049725056,
-0.050404489040374756,
-0.035055067390203476,
-0.02946723997592926,
-0.026365425437688828,
-0.07339441031217575,
-0.008507182821631432,
... | 7 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "CharField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 30}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "PointField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "point", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "GeoManager", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "objects", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "geoadmin"}}, "targets": [{"_type": "Name", "_fields": {"id": "app_label", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "name": "Meta", "bases": [], "keywords": [], "type_params": [], "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "name", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "name": "__str__", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "City", "bases": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Model", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class City(models.Model):
name = models.CharField(max_length=30)
point = models.PointField()
objects = models.GeoManager()
class Meta:
app_label = 'geoadmin'
def __str__(self):
return self.name | |
9,776 | [
0.054439276456832886,
0.003306823782622814,
0.017565928399562836,
-0.023052135482430458,
0.03152807429432869,
-0.005657336208969355,
0.01176766213029623,
0.007076703477650881,
0.004575194325298071,
0.053432635962963104,
-0.027602164074778557,
0.021803896874189377,
0.006367019843310118,
-0.... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "ArgumentParser", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "description", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "Send the contents of a directory as a MIME message.\nUnless the -o option is given, the email is sent by forwarding to your local\nSMTP server, which then does the normal delivery process. Your local machine\nmust be running an SMTP server.\n"}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "parser", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "-d"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "--directory"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_argument", "value": {"_type": "Name", "_fields": {"id": "parser", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "help", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "Mail the contents of the specified directory,\n otherwise use the current directory. Only the regular\n files in the directory are sent, and we don't recurse to\n subdirectories."}}}}]}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "-o"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "--output"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_argument", "value": {"_type": "Name", "_fields": {"id": "parser", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "metavar", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "FILE"}}}}, {"_type": "keyword", "_fields": {"arg": "help", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "Print the composed message to FILE instead of\n sending the message to the SMTP server."}}}}]}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "-s"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "--sender"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_argument", "value": {"_type": "Name", "_fields": {"id": "parser", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "required", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}, {"_type": "keyword", "_fields": {"arg": "help", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "The value of the From: header (required)"}}}}]}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "-r"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "--recipient"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_argument", "value": {"_type": "Name", "_fields": {"id": "parser", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "required", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}, {"_type": "keyword", "_fields": {"arg": "action", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "append"}}}}, {"_type": "keyword", "_fields": {"arg": "metavar", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "RECIPIENT"}}}}, {"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}}}, {"_type": "keyword", "_fields": {"arg": "dest", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "recipients"}}}}, {"_type": "keyword", "_fields": {"arg": "help", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "A To: header value (at least one required)"}}}}]}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "parse_args", "value": {"_type": "Name", "_fields": {"id": "parser", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "args", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "directory", "value": {"_type": "Name", "_fields": {"id": "args", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Name", "_fields": {"id": "directory", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "."}}, "targets": [{"_type": "Name", "_fields": {"id": "directory", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "test": {"_type": "UnaryOp", "_fields": {"op": {"_type": "Not", "_fields": {}}, "operand": {"_type": "Name", "_fields": {"id": "directory", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "MIMEMultipart", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "outer", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "BinOp", "_fields": {"op": {"_type": "Mod", "_fields": {}}, "left": {"_type": "Constant", "_fields": {"kind": null, "value": "Contents of directory %s"}}, "right": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "directory", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "abspath", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "Subject"}}, "value": {"_type": "Name", "_fields": {"id": "outer", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "recipients", "value": {"_type": "Name", "_fields": {"id": "args", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Name", "_fields": {"id": "COMMASPACE", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "To"}}, "value": {"_type": "Name", "_fields": {"id": "outer", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "sender", "value": {"_type": "Name", "_fields": {"id": "args", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "From"}}, "value": {"_type": "Name", "_fields": {"id": "outer", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "You will not see this in a MIME-aware mail reader.\n"}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "preamble", "value": {"_type": "Name", "_fields": {"id": "outer", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "directory", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "filename", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "path", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Continue", "_fields": {}}], "test": {"_type": "UnaryOp", "_fields": {"op": {"_type": "Not", "_fields": {}}, "operand": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "path", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "isfile", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, "orelse": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "path", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "guess_type", "value": {"_type": "Name", "_fields": {"id": "mimetypes", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "ctype", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "encoding", "ctx": {"_type": "Store", "_fields": {}}}}]}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "application/octet-stream"}}, "targets": [{"_type": "Name", "_fields": {"id": "ctype", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "test": {"_type": "BoolOp", "_fields": {"op": {"_type": "Or", "_fields": {}}, "values": [{"_type": "Compare", "_fields": {"ops": [{"_type": "Is", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "ctype", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}]}}, {"_type": "Compare", "_fields": {"ops": [{"_type": "IsNot", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "encoding", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}]}}]}}, "orelse": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "/"}}, {"_type": "Constant", "_fields": {"kind": null, "value": 1}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "split", "value": {"_type": "Name", "_fields": {"id": "ctype", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "maintype", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "subtype", "ctx": {"_type": "Store", "_fields": {}}}}]}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "With", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "read", "value": {"_type": "Name", "_fields": {"id": "fp", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Name", "_fields": {"id": "MIMEText", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "_subtype", "value": {"_type": "Name", "_fields": {"id": "subtype", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "msg", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "items": [{"_type": "withitem", "_fields": {"context_expr": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "path", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "open", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "optional_vars": {"_type": "Name", "_fields": {"id": "fp", "ctx": {"_type": "Store", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "maintype", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "text"}}]}}, "orelse": [{"_type": "If", "_fields": {"body": [{"_type": "With", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "read", "value": {"_type": "Name", "_fields": {"id": "fp", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Name", "_fields": {"id": "MIMEImage", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "_subtype", "value": {"_type": "Name", "_fields": {"id": "subtype", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "msg", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "items": [{"_type": "withitem", "_fields": {"context_expr": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "path", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "rb"}}], "func": {"_type": "Name", "_fields": {"id": "open", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "optional_vars": {"_type": "Name", "_fields": {"id": "fp", "ctx": {"_type": "Store", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "maintype", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "image"}}]}}, "orelse": [{"_type": "If", "_fields": {"body": [{"_type": "With", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "read", "value": {"_type": "Name", "_fields": {"id": "fp", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Name", "_fields": {"id": "MIMEAudio", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "_subtype", "value": {"_type": "Name", "_fields": {"id": "subtype", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "msg", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "items": [{"_type": "withitem", "_fields": {"context_expr": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "path", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "rb"}}], "func": {"_type": "Name", "_fields": {"id": "open", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "optional_vars": {"_type": "Name", "_fields": {"id": "fp", "ctx": {"_type": "Store", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Eq", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "maintype", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "audio"}}]}}, "orelse": [{"_type": "With", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "maintype", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "subtype", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "MIMEBase", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "msg", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "read", "value": {"_type": "Name", "_fields": {"id": "fp", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "set_payload", "value": {"_type": "Name", "_fields": {"id": "msg", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "items": [{"_type": "withitem", "_fields": {"context_expr": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "path", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "rb"}}], "func": {"_type": "Name", "_fields": {"id": "open", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "optional_vars": {"_type": "Name", "_fields": {"id": "fp", "ctx": {"_type": "Store", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "msg", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "encode_base64", "value": {"_type": "Name", "_fields": {"id": "encoders", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}]}}]}}]}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Content-Disposition"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "attachment"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "add_header", "value": {"_type": "Name", "_fields": {"id": "msg", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "filename", "value": {"_type": "Name", "_fields": {"id": "filename", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "msg", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "attach", "value": {"_type": "Name", "_fields": {"id": "outer", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "directory", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "listdir", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "filename", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "as_string", "value": {"_type": "Name", "_fields": {"id": "outer", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "composed", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "With", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "composed", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "write", "value": {"_type": "Name", "_fields": {"id": "fp", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "items": [{"_type": "withitem", "_fields": {"context_expr": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "output", "value": {"_type": "Name", "_fields": {"id": "args", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "w"}}], "func": {"_type": "Name", "_fields": {"id": "open", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "optional_vars": {"_type": "Name", "_fields": {"id": "fp", "ctx": {"_type": "Store", "_fields": {}}}}}}], "type_comment": null}}], "test": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "output", "value": {"_type": "Name", "_fields": {"id": "args", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [{"_type": "With", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "sender", "value": {"_type": "Name", "_fields": {"id": "args", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "recipients", "value": {"_type": "Name", "_fields": {"id": "args", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Name", "_fields": {"id": "composed", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "sendmail", "value": {"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "items": [{"_type": "withitem", "_fields": {"context_expr": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "localhost"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "SMTP", "value": {"_type": "Name", "_fields": {"id": "smtplib", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "optional_vars": {"_type": "Name", "_fields": {"id": "s", "ctx": {"_type": "Store", "_fields": {}}}}}}], "type_comment": null}}]}}], "name": "main", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def main():
parser = ArgumentParser(description="""\
Send the contents of a directory as a MIME message.
Unless the -o option is given, the email is sent by forwarding to your local
SMTP server, which then does the normal delivery process. Your local machine
must be running an SMTP server.
""")
parser.add_argument('-d', '--directory',
help="""Mail the contents of the specified directory,
otherwise use the current directory. Only the regular
files in the directory are sent, and we don't recurse to
subdirectories.""")
parser.add_argument('-o', '--output',
metavar='FILE',
help="""Print the composed message to FILE instead of
sending the message to the SMTP server.""")
parser.add_argument('-s', '--sender', required=True,
help='The value of the From: header (required)')
parser.add_argument('-r', '--recipient', required=True,
action='append', metavar='RECIPIENT',
default=[], dest='recipients',
help='A To: header value (at least one required)')
args = parser.parse_args()
directory = args.directory
if not directory:
directory = '.'
# Create the enclosing (outer) message
outer = MIMEMultipart()
outer['Subject'] = 'Contents of directory %s' % os.path.abspath(directory)
outer['To'] = COMMASPACE.join(args.recipients)
outer['From'] = args.sender
outer.preamble = 'You will not see this in a MIME-aware mail reader.\n'
for filename in os.listdir(directory):
path = os.path.join(directory, filename)
if not os.path.isfile(path):
continue
# Guess the content type based on the file's extension. Encoding
# will be ignored, although we should check for simple things like
# gzip'd or compressed files.
ctype, encoding = mimetypes.guess_type(path)
if ctype is None or encoding is not None:
# No guess could be made, or the file is encoded (compressed), so
# use a generic bag-of-bits type.
ctype = 'application/octet-stream'
maintype, subtype = ctype.split('/', 1)
if maintype == 'text':
with open(path) as fp:
# Note: we should handle calculating the charset
msg = MIMEText(fp.read(), _subtype=subtype)
elif maintype == 'image':
with open(path, 'rb') as fp:
msg = MIMEImage(fp.read(), _subtype=subtype)
elif maintype == 'audio':
with open(path, 'rb') as fp:
msg = MIMEAudio(fp.read(), _subtype=subtype)
else:
with open(path, 'rb') as fp:
msg = MIMEBase(maintype, subtype)
msg.set_payload(fp.read())
# Encode the payload using Base64
encoders.encode_base64(msg)
# Set the filename parameter
msg.add_header('Content-Disposition', 'attachment', filename=filename)
outer.attach(msg)
# Now send or store the message
composed = outer.as_string()
if args.output:
with open(args.output, 'w') as fp:
fp.write(composed)
else:
with smtplib.SMTP('localhost') as s:
s.sendmail(args.sender, args.recipients, composed) | |
9,777 | [
0.0026336507871747017,
-0.042552389204502106,
0.004398496355861425,
-0.014924928545951843,
0.017888126894831657,
-0.025448637083172798,
-0.023770945146679878,
-0.013704787939786911,
0.009298121556639671,
-0.00013830410898663104,
-0.004082567058503628,
-0.037192486226558685,
-0.00955413281917... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "requests", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "headers", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": ""}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "body", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "name": "__init__", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "netloc", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "name": "__call__", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Pass", "_fields": {}}], "name": "connect", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "connect", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Name", "_fields": {"id": "endheaders", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "method", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "url", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "method", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "url", "ctx": {"_type": "Load", "_fields": {}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "requests", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}], "name": "putrequest", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "name", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "value", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "name", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "value", "ctx": {"_type": "Load", "_fields": {}}}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "headers", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}], "name": "putheader", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "body", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "body", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "body", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "name": "send", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "Response", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "getresponse", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "FakeConnection", "bases": [{"_type": "Name", "_fields": {"id": "object", "ctx": {"_type": "Load", "_fields": {}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class FakeConnection(object):
def __init__(self):
self.requests = []
self.headers = []
self.body = ''
def __call__(self, netloc):
return self
def connect(self):
pass
endheaders = connect
def putrequest(self, method, url):
self.requests.append((method, url))
def putheader(self, name, value):
self.headers.append((name, value))
def send(self, body):
self.body = body
def getresponse(self):
return Response() | |
9,778 | [
-0.019599704071879387,
0.01698077842593193,
0.03719599172472954,
0.019720392301678658,
0.009552442468702793,
-0.04856478422880173,
-0.0006675546173937619,
0.011175693944096565,
-0.005020614247769117,
0.027420276775956154,
-0.03478223457932472,
-0.01735491119325161,
0.02086692675948143,
0.0... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "cr", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "uid", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "fields_list", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [], "values": []}}, "targets": [{"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Is", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}]}}, "orelse": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "cr", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "uid", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "fields_list", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "default_get", "value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "attach_mail_manually", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "super", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "defaults", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "mail_ids"}}, "value": {"_type": "Name", "_fields": {"id": "defaults", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "connect", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "server_id", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "select", "value": {"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "IfExp", "_fields": {"body": {"_type": "Constant", "_fields": {"kind": null, "value": "FLAGGED"}}, "test": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "flag_nonmatching", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": {"_type": "Constant", "_fields": {"kind": null, "value": "UNDELETED"}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "search", "value": {"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "msgids", "ctx": {"_type": "Store", "_fields": {}}}}]}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Could not search mailbox %s on %s"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "name", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "server_id", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "error", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Continue", "_fields": {}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "NotEq", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "OK"}}]}}, "orelse": []}}, {"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "msgid", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "(RFC822)"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "fetch", "value": {"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "msgdata", "ctx": {"_type": "Store", "_fields": {}}}}]}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Could not fetch %s in %s on %s"}}, {"_type": "Name", "_fields": {"id": "msgid", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "name", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "server_id", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "error", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Continue", "_fields": {}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "NotEq", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "OK"}}]}}, "orelse": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "cr", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "uid", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 1}}, "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "value": {"_type": "Name", "_fields": {"id": "msgdata", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "message_parse", "value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "mail.thread"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "pool", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "save_original", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "original", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "server_id", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, {"_type": "keyword", "_fields": {"arg": "context", "value": {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "mail_message", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}, {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "msgid"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "subject"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "date"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "object_id"}}], "values": [{"_type": "Name", "_fields": {"id": "msgid", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "subject"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ""}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Name", "_fields": {"id": "mail_message", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "date"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ""}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Name", "_fields": {"id": "mail_message", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, {"_type": "BinOp", "_fields": {"op": {"_type": "Mod", "_fields": {}}, "left": {"_type": "Constant", "_fields": {"kind": null, "value": "%s,-1"}}, "right": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "model", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "model_id", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "mail_ids"}}, "value": {"_type": "Name", "_fields": {"id": "defaults", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}], "iter": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "split", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "value": {"_type": "Name", "_fields": {"id": "msgids", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "msgid", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "close", "value": {"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "cr", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "uid", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "default_folder_id"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}]}}, {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "browse", "value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "fetchmail.server.folder"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "pool", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, "keywords": []}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "defaults", "ctx": {"_type": "Load", "_fields": {}}}}}}], "name": "default_get", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def default_get(self, cr, uid, fields_list, context=None):
if context is None:
context = {}
defaults = super(attach_mail_manually, self).default_get(
cr, uid, fields_list, context
)
for folder in self.pool.get('fetchmail.server.folder').browse(
cr, uid,
[context.get('default_folder_id')], context):
defaults['mail_ids'] = []
connection = folder.server_id.connect()
connection.select(folder.path)
result, msgids = connection.search(
None,
'FLAGGED' if folder.flag_nonmatching else 'UNDELETED')
if result != 'OK':
_logger.error('Could not search mailbox %s on %s',
folder.path, folder.server_id.name)
continue
for msgid in msgids[0].split():
result, msgdata = connection.fetch(msgid, '(RFC822)')
if result != 'OK':
_logger.error('Could not fetch %s in %s on %s',
msgid, folder.path, folder.server_id.name)
continue
mail_message = self.pool.get('mail.thread').message_parse(
cr, uid, msgdata[0][1],
save_original=folder.server_id.original,
context=context
)
defaults['mail_ids'].append((0, 0, {
'msgid': msgid,
'subject': mail_message.get('subject', ''),
'date': mail_message.get('date', ''),
'object_id': '%s,-1' % folder.model_id.model,
}))
connection.close()
return defaults | |
9,779 | [
-0.023304099217057228,
0.05184122547507286,
0.023890981450676918,
-0.016958439722657204,
0.004242666531354189,
-0.04264674708247185,
-0.0332077294588089,
-0.008057398721575737,
-0.011762090027332306,
0.03927217423915863,
-0.010973467491567135,
-0.03130036219954491,
0.041448529809713364,
0.... | 14 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "fetchmail.attach.mail.manually"}}, "targets": [{"_type": "Name", "_fields": {"id": "_name", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "fetchmail.server.folder"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Folder"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Many2one", "value": {"_type": "Name", "_fields": {"id": "fields", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "readonly", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "folder_id", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "fetchmail.attach.mail.manually.mail"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "wizard_id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "Emails"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "One2many", "value": {"_type": "Name", "_fields": {"id": "fields", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "mail_ids", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "cr", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "uid", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "fields_list", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [], "values": []}}, "targets": [{"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "Is", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}]}}, "orelse": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "cr", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "uid", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "fields_list", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "default_get", "value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "attach_mail_manually", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "super", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "defaults", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "mail_ids"}}, "value": {"_type": "Name", "_fields": {"id": "defaults", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "connect", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "server_id", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "select", "value": {"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "IfExp", "_fields": {"body": {"_type": "Constant", "_fields": {"kind": null, "value": "FLAGGED"}}, "test": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "flag_nonmatching", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": {"_type": "Constant", "_fields": {"kind": null, "value": "UNDELETED"}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "search", "value": {"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "msgids", "ctx": {"_type": "Store", "_fields": {}}}}]}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Could not search mailbox %s on %s"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "name", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "server_id", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "error", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Continue", "_fields": {}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "NotEq", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "OK"}}]}}, "orelse": []}}, {"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "msgid", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "(RFC822)"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "fetch", "value": {"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "msgdata", "ctx": {"_type": "Store", "_fields": {}}}}]}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Could not fetch %s in %s on %s"}}, {"_type": "Name", "_fields": {"id": "msgid", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "name", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "server_id", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "error", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Continue", "_fields": {}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "NotEq", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "OK"}}]}}, "orelse": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "cr", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "uid", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 1}}, "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "value": {"_type": "Name", "_fields": {"id": "msgdata", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "message_parse", "value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "mail.thread"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "pool", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "save_original", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "original", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "server_id", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, {"_type": "keyword", "_fields": {"arg": "context", "value": {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "mail_message", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": 0}}, {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "msgid"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "subject"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "date"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "object_id"}}], "values": [{"_type": "Name", "_fields": {"id": "msgid", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "subject"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ""}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Name", "_fields": {"id": "mail_message", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "date"}}, {"_type": "Constant", "_fields": {"kind": null, "value": ""}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Name", "_fields": {"id": "mail_message", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, {"_type": "BinOp", "_fields": {"op": {"_type": "Mod", "_fields": {}}, "left": {"_type": "Constant", "_fields": {"kind": null, "value": "%s,-1"}}, "right": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "model", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "model_id", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}]}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "append", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "mail_ids"}}, "value": {"_type": "Name", "_fields": {"id": "defaults", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}], "iter": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "split", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "value": {"_type": "Name", "_fields": {"id": "msgids", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "msgid", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "close", "value": {"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "cr", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "uid", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "default_folder_id"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}]}}, {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "browse", "value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "fetchmail.server.folder"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "pool", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, "keywords": []}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "defaults", "ctx": {"_type": "Load", "_fields": {}}}}}}], "name": "default_get", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "cr", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "uid", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "ids", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "For", "_fields": {"body": [{"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "connect", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "server_id", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "folder_id", "value": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "folder_id", "value": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "select", "value": {"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "msgid", "value": {"_type": "Name", "_fields": {"id": "mail", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "(RFC822)"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "fetch", "value": {"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "msgdata", "ctx": {"_type": "Store", "_fields": {}}}}]}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Could not fetch %s in %s on %s"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "msgid", "value": {"_type": "Name", "_fields": {"id": "mail", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "folder_id", "value": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "server", "value": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "error", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Continue", "_fields": {}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "NotEq", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "OK"}}]}}, "orelse": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "cr", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "uid", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 1}}, "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "value": {"_type": "Name", "_fields": {"id": "msgdata", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "message_parse", "value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "mail.thread"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "pool", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "save_original", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "original", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "server_id", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "folder_id", "value": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}}}, {"_type": "keyword", "_fields": {"arg": "context", "value": {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "mail_message", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "object_id", "value": {"_type": "Name", "_fields": {"id": "mail", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "folder_id", "value": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Name", "_fields": {"id": "mail_message", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "msgid", "value": {"_type": "Name", "_fields": {"id": "mail", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "attach_mail", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "server_id", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "folder_id", "value": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "close", "value": {"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "mail_ids", "value": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "mail", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}], "iter": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "cr", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "uid", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "ids", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "browse", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "type"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "ir.actions.act_window_close"}}]}}}}], "name": "attach_mails", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "cr", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "user", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "view_id", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "view_type", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "toolbar", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "submenu", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "Constant", "_fields": {"kind": null, "value": "form"}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "Constant", "_fields": {"kind": null, "value": false}}, {"_type": "Constant", "_fields": {"kind": null, "value": false}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "cr", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "user", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "view_id", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "view_type", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "toolbar", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "submenu", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "fields_view_get", "value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "attach_mail_manually", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "super", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "tree"}}, "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "views"}}, "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "mail_ids"}}, "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "fields"}}, "value": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}}}, "targets": [{"_type": "Name", "_fields": {"id": "tree", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "model", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "model_id", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "name", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "model_id", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}]}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "selection"}}, "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "object_id"}}, "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "fields"}}, "value": {"_type": "Name", "_fields": {"id": "tree", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}], "type_comment": null}}], "iter": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "cr", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "user", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "default_folder_id"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}]}}, {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "browse", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "fetchmail.server.folder"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "pool", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": []}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}}}], "name": "fields_view_get", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "attach_mail_manually", "bases": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "TransientModel", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class attach_mail_manually(models.TransientModel):
_name = 'fetchmail.attach.mail.manually'
folder_id = fields.Many2one(
'fetchmail.server.folder', 'Folder', readonly=True)
mail_ids = fields.One2many(
'fetchmail.attach.mail.manually.mail', 'wizard_id', 'Emails')
def default_get(self, cr, uid, fields_list, context=None):
if context is None:
context = {}
defaults = super(attach_mail_manually, self).default_get(
cr, uid, fields_list, context
)
for folder in self.pool.get('fetchmail.server.folder').browse(
cr, uid,
[context.get('default_folder_id')], context):
defaults['mail_ids'] = []
connection = folder.server_id.connect()
connection.select(folder.path)
result, msgids = connection.search(
None,
'FLAGGED' if folder.flag_nonmatching else 'UNDELETED')
if result != 'OK':
_logger.error('Could not search mailbox %s on %s',
folder.path, folder.server_id.name)
continue
for msgid in msgids[0].split():
result, msgdata = connection.fetch(msgid, '(RFC822)')
if result != 'OK':
_logger.error('Could not fetch %s in %s on %s',
msgid, folder.path, folder.server_id.name)
continue
mail_message = self.pool.get('mail.thread').message_parse(
cr, uid, msgdata[0][1],
save_original=folder.server_id.original,
context=context
)
defaults['mail_ids'].append((0, 0, {
'msgid': msgid,
'subject': mail_message.get('subject', ''),
'date': mail_message.get('date', ''),
'object_id': '%s,-1' % folder.model_id.model,
}))
connection.close()
return defaults
def attach_mails(self, cr, uid, ids, context=None):
for this in self.browse(cr, uid, ids, context):
for mail in this.mail_ids:
connection = this.folder_id.server_id.connect()
connection.select(this.folder_id.path)
result, msgdata = connection.fetch(mail.msgid, '(RFC822)')
if result != 'OK':
_logger.error('Could not fetch %s in %s on %s',
mail.msgid, this.folder_id.path, this.server)
continue
mail_message = self.pool.get('mail.thread').message_parse(
cr, uid, msgdata[0][1],
save_original=this.folder_id.server_id.original,
context=context)
this.folder_id.server_id.attach_mail(
connection,
mail.object_id.id, this.folder_id, mail_message,
mail.msgid
)
connection.close()
return {'type': 'ir.actions.act_window_close'}
def fields_view_get(self, cr, user, view_id=None, view_type='form',
context=None, toolbar=False, submenu=False):
result = super(attach_mail_manually, self).fields_view_get(
cr, user, view_id, view_type, context, toolbar, submenu)
tree = result['fields']['mail_ids']['views']['tree']
for folder in self.pool['fetchmail.server.folder'].browse(
cr, user, [context.get('default_folder_id')], context):
tree['fields']['object_id']['selection'] = [
(folder.model_id.model, folder.model_id.name)
]
return result | |
9,780 | [
0.007150496821850538,
0.034545257687568665,
0.024214182049036026,
0.013708988204598427,
0.00382772134616971,
-0.04773188754916191,
0.0020183322485536337,
0.026489341631531715,
0.010748961009085178,
0.052700091153383255,
0.012374074198305607,
-0.042856547981500626,
0.01845663972198963,
0.01... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "cr", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "uid", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "ids", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "For", "_fields": {"body": [{"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "connect", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "server_id", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "folder_id", "value": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "folder_id", "value": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "select", "value": {"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "msgid", "value": {"_type": "Name", "_fields": {"id": "mail", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "(RFC822)"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "fetch", "value": {"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "msgdata", "ctx": {"_type": "Store", "_fields": {}}}}]}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Could not fetch %s in %s on %s"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "msgid", "value": {"_type": "Name", "_fields": {"id": "mail", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "folder_id", "value": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "server", "value": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "error", "value": {"_type": "Name", "_fields": {"id": "_logger", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Continue", "_fields": {}}], "test": {"_type": "Compare", "_fields": {"ops": [{"_type": "NotEq", "_fields": {}}], "left": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}, "comparators": [{"_type": "Constant", "_fields": {"kind": null, "value": "OK"}}]}}, "orelse": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "cr", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "uid", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 1}}, "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "value": {"_type": "Name", "_fields": {"id": "msgdata", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "message_parse", "value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "mail.thread"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "pool", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "save_original", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "original", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "server_id", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "folder_id", "value": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}}}, {"_type": "keyword", "_fields": {"arg": "context", "value": {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "mail_message", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "object_id", "value": {"_type": "Name", "_fields": {"id": "mail", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "folder_id", "value": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Name", "_fields": {"id": "mail_message", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "msgid", "value": {"_type": "Name", "_fields": {"id": "mail", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "attach_mail", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "server_id", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "folder_id", "value": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": []}}}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "close", "value": {"_type": "Name", "_fields": {"id": "connection", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "iter": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "mail_ids", "value": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "mail", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}], "iter": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "cr", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "uid", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "ids", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "browse", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "this", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "type"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "ir.actions.act_window_close"}}]}}}}], "name": "attach_mails", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def attach_mails(self, cr, uid, ids, context=None):
for this in self.browse(cr, uid, ids, context):
for mail in this.mail_ids:
connection = this.folder_id.server_id.connect()
connection.select(this.folder_id.path)
result, msgdata = connection.fetch(mail.msgid, '(RFC822)')
if result != 'OK':
_logger.error('Could not fetch %s in %s on %s',
mail.msgid, this.folder_id.path, this.server)
continue
mail_message = self.pool.get('mail.thread').message_parse(
cr, uid, msgdata[0][1],
save_original=this.folder_id.server_id.original,
context=context)
this.folder_id.server_id.attach_mail(
connection,
mail.object_id.id, this.folder_id, mail_message,
mail.msgid
)
connection.close()
return {'type': 'ir.actions.act_window_close'} | |
9,781 | [
0.0019342812011018395,
0.0401013046503067,
0.00734420120716095,
-0.007823798805475235,
0.013821659609675407,
-0.061342284083366394,
-0.0036287636030465364,
-0.017508206889033318,
-0.03265887126326561,
0.03924611955881119,
0.01587872952222824,
-0.03684234991669655,
0.027550866827368736,
0.0... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "cr", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "user", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "view_id", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "view_type", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "toolbar", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "submenu", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "Constant", "_fields": {"kind": null, "value": "form"}}, {"_type": "Constant", "_fields": {"kind": null, "value": null}}, {"_type": "Constant", "_fields": {"kind": null, "value": false}}, {"_type": "Constant", "_fields": {"kind": null, "value": false}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "cr", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "user", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "view_id", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "view_type", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "toolbar", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "submenu", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "fields_view_get", "value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "attach_mail_manually", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "super", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "tree"}}, "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "views"}}, "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "mail_ids"}}, "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "fields"}}, "value": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}}}, "targets": [{"_type": "Name", "_fields": {"id": "tree", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "For", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "model", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "model_id", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "name", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "model_id", "value": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Load", "_fields": {}}}}}}}}]}}]}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "selection"}}, "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "object_id"}}, "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "fields"}}, "value": {"_type": "Name", "_fields": {"id": "tree", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}], "type_comment": null}}], "iter": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "cr", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "user", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "default_folder_id"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "get", "value": {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}]}}, {"_type": "Name", "_fields": {"id": "context", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "browse", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "fetchmail.server.folder"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "pool", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": []}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "folder", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Name", "_fields": {"id": "result", "ctx": {"_type": "Load", "_fields": {}}}}}}], "name": "fields_view_get", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def fields_view_get(self, cr, user, view_id=None, view_type='form',
context=None, toolbar=False, submenu=False):
result = super(attach_mail_manually, self).fields_view_get(
cr, user, view_id, view_type, context, toolbar, submenu)
tree = result['fields']['mail_ids']['views']['tree']
for folder in self.pool['fetchmail.server.folder'].browse(
cr, user, [context.get('default_folder_id')], context):
tree['fields']['object_id']['selection'] = [
(folder.model_id.model, folder.model_id.name)
]
return result | |
9,782 | [
0.015374403446912766,
0.06386826932430267,
0.019767090678215027,
-0.024543266743421555,
-0.004392686765640974,
-0.03474638611078262,
-0.020464342087507248,
-0.013538307510316372,
-0.007704633288085461,
0.014375009573996067,
-0.04060330241918564,
-0.01430528424680233,
0.043113406747579575,
... | 13 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "fetchmail.attach.mail.manually.mail"}}, "targets": [{"_type": "Name", "_fields": {"id": "_name", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "fetchmail.attach.mail.manually"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Many2one", "value": {"_type": "Name", "_fields": {"id": "fields", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "readonly", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "wizard_id", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Message id"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Char", "value": {"_type": "Name", "_fields": {"id": "fields", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "readonly", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "msgid", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Subject"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Char", "value": {"_type": "Name", "_fields": {"id": "fields", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "readonly", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "subject", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Date"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Datetime", "value": {"_type": "Name", "_fields": {"id": "fields", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "readonly", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "date", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Lambda", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": {"_type": "ListComp", "_fields": {"elt": {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "model", "value": {"_type": "Name", "_fields": {"id": "m", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "name", "value": {"_type": "Name", "_fields": {"id": "m", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "generators": [{"_type": "comprehension", "_fields": {"ifs": [], "iter": {"_type": "Call", "_fields": {"args": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "search", "value": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "ir.model"}}, "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "env", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}}}, "keywords": []}}, "target": {"_type": "Name", "_fields": {"id": "m", "ctx": {"_type": "Store", "_fields": {}}}}, "is_async": 0}}]}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Reference", "value": {"_type": "Name", "_fields": {"id": "fields", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "string", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "Object"}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "object_id", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "name": "attach_mail_manually_mail", "bases": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "TransientModel", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class attach_mail_manually_mail(models.TransientModel):
_name = 'fetchmail.attach.mail.manually.mail'
wizard_id = fields.Many2one(
'fetchmail.attach.mail.manually', readonly=True)
msgid = fields.Char('Message id', readonly=True)
subject = fields.Char('Subject', readonly=True)
date = fields.Datetime('Date', readonly=True)
object_id = fields.Reference(
lambda self: [
(m.model, m.name)
for m in self.env['ir.model'].search([])
],
string='Object') | |
9,783 | [
-0.005939344875514507,
-0.007990577258169651,
0.022399814799427986,
-0.055683963000774384,
0.025674642994999886,
0.025341205298900604,
0.01302785612642765,
-0.0196846853941679,
0.03234338015317917,
0.013277933932840824,
0.02579372748732567,
-0.027079841122031212,
-0.018029410392045975,
-0.... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "line", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "Parsing line %r; counter is %r"}}, {"_type": "Name", "_fields": {"id": "line", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "acc", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "logger", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}, {"_type": "AugAssign", "_fields": {"op": {"_type": "Add", "_fields": {}}, "value": {"_type": "Constant", "_fields": {"kind": null, "value": 1}}, "target": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "acc", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "split", "value": {"_type": "Name", "_fields": {"id": "line", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "BinOp", "_fields": {"op": {"_type": "Add", "_fields": {}}, "left": {"_type": "BinOp", "_fields": {"op": {"_type": "Add", "_fields": {}}, "left": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "args", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "right": {"_type": "Constant", "_fields": {"kind": null, "value": ":"}}}}, "right": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "value": {"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "value": {"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "acc", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 2}}, "value": {"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "metric_type"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "counter"}}]}}, "targets": [{"_type": "Subscript", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": 3}}, "value": {"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "res", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "tuple", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "parse_line", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def parse_line(self, line):
self.logger.info('Parsing line %r; counter is %r', line, self.acc)
self.acc += 1
res = line.split()
res[0] = self.args + ':' + res[0]
res[2] = self.acc
res[3] = {'metric_type': 'counter'}
return tuple(res) | |
9,784 | [
0.04347015172243118,
-0.02226637862622738,
0.04610251262784004,
0.0009546830551698804,
-0.012328618206083775,
0.005463956389576197,
0.020104944705963135,
-0.008790630847215652,
0.008899305947124958,
0.016917133703827858,
0.011054701171815395,
-0.017762387171387672,
-0.00955135840922594,
-0... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setUp", "value": {"_type": "Name", "_fields": {"id": "TailTestCase", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "dogstreams"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "check_freq"}}], "values": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "name", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "log_file", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": 5}}]}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "config", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "BinOp", "_fields": {"op": {"_type": "Mod", "_fields": {}}, "left": {"_type": "Constant", "_fields": {"kind": null, "value": "Test config: %s"}}, "right": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "config", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "info", "value": {"_type": "Name", "_fields": {"id": "log", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "logger", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "config", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "init", "value": {"_type": "Name", "_fields": {"id": "Dogstreams", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "dogstream", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": null}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "maxDiff", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "name": "setUp", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def setUp(self):
TailTestCase.setUp(self)
self.config = {
'dogstreams': self.log_file.name,
'check_freq': 5,
}
log.info("Test config: %s" % self.config)
self.dogstream = Dogstreams.init(self.logger, self.config)
self.maxDiff = None | |
9,785 | [
0.04555003345012665,
-0.01217360608279705,
0.05048498138785362,
-0.03928308188915253,
0.020438557490706444,
0.00841780286282301,
-0.0001972069585463032,
-0.007757262326776981,
0.015394425950944424,
-0.009061967022716999,
-0.005336188245564699,
0.005210631061345339,
-0.012872360646724701,
-... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Name", "_fields": {"id": "NamedTemporaryFile", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "log_file", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.dogstream"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "getLogger", "value": {"_type": "Name", "_fields": {"id": "logging", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "logger", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "name": "setUp", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "log_data", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "For", "_fields": {"body": [{"_type": "Expr", "_fields": {"value": {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "BinOp", "_fields": {"op": {"_type": "RShift", "_fields": {}}, "left": {"_type": "Name", "_fields": {"id": "print", "ctx": {"_type": "Load", "_fields": {}}}}, "right": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "log_file", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "Name", "_fields": {"id": "data", "ctx": {"_type": "Load", "_fields": {}}}}]}}}}], "iter": {"_type": "Name", "_fields": {"id": "log_data", "ctx": {"_type": "Load", "_fields": {}}}}, "orelse": [], "target": {"_type": "Name", "_fields": {"id": "data", "ctx": {"_type": "Store", "_fields": {}}}}, "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "flush", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "log_file", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}], "name": "_write_log", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "close", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "log_file", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}], "name": "tearDown", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "TailTestCase", "bases": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "TestCase", "value": {"_type": "Name", "_fields": {"id": "unittest", "ctx": {"_type": "Load", "_fields": {}}}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class TailTestCase(unittest.TestCase):
def setUp(self):
self.log_file = NamedTemporaryFile()
self.logger = logging.getLogger('test.dogstream')
def _write_log(self, log_data):
for data in log_data:
print >> self.log_file, data
self.log_file.flush()
def tearDown(self):
self.log_file.close() | |
9,786 | [
0.06275200843811035,
-0.040389034897089005,
0.005375714972615242,
-0.06149212270975113,
0.0024455718230456114,
0.046203892678022385,
-0.002001886023208499,
-0.012829030863940716,
0.023283660411834717,
0.017602059990167618,
0.03559177741408348,
0.022217603400349617,
-0.0071232011541724205,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "1000000000"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "10"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "metric_type=counter"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "1000000001"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "20"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "metric_type=counter"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "1000000002"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "3"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "metric_type=counter"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "1000000003"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "4"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "metric_type=counter"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "1000000004"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "5"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "metric_type=counter"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "1000000005"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "12"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "metric_type=counter"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "1000000006"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "7"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "metric_type=counter"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "1000000007"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "8"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "metric_type=counter"}}]}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "log_data", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "dogstream"}}], "values": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": 1000000000}}, {"_type": "Constant", "_fields": {"kind": null, "value": 42}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "counter", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": 1000000005}}, {"_type": "Constant", "_fields": {"kind": null, "value": 27}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "counter", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}]}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "expected_output", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "GeneratorExp", "_fields": {"elt": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "data", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Constant", "_fields": {"kind": null, "value": " "}}}}, "keywords": []}}, "generators": [{"_type": "comprehension", "_fields": {"ifs": [], "iter": {"_type": "Name", "_fields": {"id": "log_data", "ctx": {"_type": "Load", "_fields": {}}}}, "target": {"_type": "Name", "_fields": {"id": "data", "ctx": {"_type": "Store", "_fields": {}}}}, "is_async": 0}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_write_log", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "config", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "check", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dogstream", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "move_end", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "actual_output", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "expected_output", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "actual_output", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEquals", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "For", "_fields": {"body": [{"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "val", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "int", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "long", "ctx": {"_type": "Load", "_fields": {}}}}]}}], "func": {"_type": "Name", "_fields": {"id": "isinstance", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "iter": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "dogstream"}}, "value": {"_type": "Name", "_fields": {"id": "expected_output", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Tuple", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "metric", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "timestamp", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "val", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "attr", "ctx": {"_type": "Store", "_fields": {}}}}]}}, "type_comment": null}}], "name": "test_dogstream_counter", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_dogstream_counter(self):
log_data = [
# bucket 0
('test.metric.a', '1000000000', '10', 'metric_type=counter'),
('test.metric.a', '1000000001', '20', 'metric_type=counter'),
('test.metric.a', '1000000002', '3', 'metric_type=counter'),
('test.metric.a', '1000000003', '4', 'metric_type=counter'),
('test.metric.a', '1000000004', '5', 'metric_type=counter'),
# bucket 1
('test.metric.a', '1000000005', '12', 'metric_type=counter'),
('test.metric.a', '1000000006', '7', 'metric_type=counter'),
('test.metric.a', '1000000007', '8', 'metric_type=counter'),
]
expected_output = {
"dogstream": [
('test.metric.a', 1000000000, 42, self.counter),
('test.metric.a', 1000000005, 27, self.counter),
]
}
self._write_log((' '.join(data) for data in log_data))
actual_output = self.dogstream.check(self.config, move_end=False)
self.assertEquals(expected_output, actual_output)
for metric, timestamp, val, attr in expected_output['dogstream']:
assert isinstance(val, (int, long)) | |
9,787 | [
0.050336405634880066,
-0.005822117906063795,
-0.009726658463478088,
-0.06706473976373672,
0.008004623465240002,
0.020487800240516663,
-0.02775440737605095,
-0.04460890218615532,
0.03358283266425133,
0.009285110980272293,
0.031993262469768524,
0.00048727908870205283,
-0.010048357769846916,
... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "1000000000"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "10"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "metric_type=gauge"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "1000000001"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "20"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "metric_type=gauge"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "1000000002"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "3"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "metric_type=gauge"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "1000000003"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "4"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "metric_type=gauge"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "1000000004"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "5"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "metric_type=gauge"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "1000000005"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "12"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "metric_type=gauge"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "1000000006"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "7"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "metric_type=gauge"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "1000000007"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "8"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "metric_type=gauge"}}]}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "log_data", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "dogstream"}}], "values": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": 1000000000}}, {"_type": "Constant", "_fields": {"kind": null, "value": 5.0}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gauge", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.a"}}, {"_type": "Constant", "_fields": {"kind": null, "value": 1000000005}}, {"_type": "Constant", "_fields": {"kind": null, "value": 8.0}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gauge", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}]}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "expected_output", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "GeneratorExp", "_fields": {"elt": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "data", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Constant", "_fields": {"kind": null, "value": " "}}}}, "keywords": []}}, "generators": [{"_type": "comprehension", "_fields": {"ifs": [], "iter": {"_type": "Name", "_fields": {"id": "log_data", "ctx": {"_type": "Load", "_fields": {}}}}, "target": {"_type": "Name", "_fields": {"id": "data", "ctx": {"_type": "Store", "_fields": {}}}}, "is_async": 0}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_write_log", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "config", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "check", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dogstream", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "move_end", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "actual_output", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "expected_output", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "actual_output", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEquals", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "For", "_fields": {"body": [{"_type": "Assert", "_fields": {"msg": null, "test": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "val", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "float", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "isinstance", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "iter": {"_type": "Subscript", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "slice": {"_type": "Constant", "_fields": {"kind": null, "value": "dogstream"}}, "value": {"_type": "Name", "_fields": {"id": "expected_output", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [], "target": {"_type": "Tuple", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "metric", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "timestamp", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "val", "ctx": {"_type": "Store", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "attr", "ctx": {"_type": "Store", "_fields": {}}}}]}}, "type_comment": null}}], "name": "test_dogstream_gauge", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_dogstream_gauge(self):
log_data = [
# bucket 0
('test.metric.a', '1000000000', '10', 'metric_type=gauge'),
('test.metric.a', '1000000001', '20', 'metric_type=gauge'),
('test.metric.a', '1000000002', '3', 'metric_type=gauge'),
('test.metric.a', '1000000003', '4', 'metric_type=gauge'),
('test.metric.a', '1000000004', '5', 'metric_type=gauge'),
# bucket 1
('test.metric.a', '1000000005', '12', 'metric_type=gauge'),
('test.metric.a', '1000000006', '7', 'metric_type=gauge'),
('test.metric.a', '1000000007', '8', 'metric_type=gauge'),
]
expected_output = {
"dogstream": [
('test.metric.a', 1000000000, 5.0, self.gauge),
('test.metric.a', 1000000005, 8.0, self.gauge),
]
}
self._write_log((' '.join(data) for data in log_data))
actual_output = self.dogstream.check(self.config, move_end=False)
self.assertEquals(expected_output, actual_output)
for metric, timestamp, val, attr in expected_output['dogstream']:
assert isinstance(val, float) | |
9,788 | [
0.06868736445903778,
0.004157188814133406,
0.0010433379793539643,
-0.05617053806781769,
-0.004671180155128241,
0.016783922910690308,
-0.016577033326029778,
-0.033981624990701675,
0.03928317129611969,
0.011527632363140583,
0.03426609933376312,
-0.025615524500608444,
-0.028938690200448036,
0... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test.metric.e1000000000 1metric_type=gauge"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "1000000001 1 metric_type=gauge tag=staging"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "test_metric.e 1 1000000002 metric_type=gauge"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "test_metric.e 1000000002 10 metric_type=gauge"}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "log_data", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "dogstream"}}], "values": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "test_metric.e"}}, {"_type": "Constant", "_fields": {"kind": null, "value": 1000000000}}, {"_type": "Constant", "_fields": {"kind": null, "value": 10}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "gauge", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}]}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "expected_output", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "log_data", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_write_log", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "config", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "check", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dogstream", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "move_end", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "actual_output", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "expected_output", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "actual_output", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEquals", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_dogstream_bad_input", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_dogstream_bad_input(self):
log_data = [
('test.metric.e1000000000 1metric_type=gauge'),
('1000000001 1 metric_type=gauge tag=staging'),
('test_metric.e 1 1000000002 metric_type=gauge'),
('test_metric.e 1000000002 10 metric_type=gauge'),
]
expected_output = {"dogstream":
[('test_metric.e', 1000000000, 10, self.gauge)]
}
self._write_log(log_data)
actual_output = self.dogstream.check(self.config, move_end=False)
self.assertEquals(expected_output, actual_output) | |
9,789 | [
0.03238539770245552,
0.0020305027719587088,
0.0035060658119618893,
-0.04393327981233597,
0.016179867088794708,
0.031974807381629944,
-0.013844628818333149,
-0.04501108452677727,
0.01194564439356327,
0.028151173144578934,
0.03425871953368187,
0.01651347428560257,
0.000993599183857441,
-0.00... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {"kind": null, "value": "2012-05-14 12:46:01 [ERROR] - host0 is down (broke its collarbone)"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2012-05-14 12:48:07 [ERROR] - host1 is down (got a bloody nose)"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2012-05-14 12:52:03 [RECOVERY] - host0 is up (collarbone healed)"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2012-05-14 12:59:09 [RECOVERY] - host1 is up (nose stopped bleeding)"}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "log_data", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "dogstreamEvents"}}], "values": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "timestamp"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "alert_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "host"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "msg_title"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "msg_text"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "event_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "aggregation_key"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "event_object"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 1336999561}}, {"_type": "Constant", "_fields": {"kind": null, "value": "error"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "host0"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "host0 is down (broke its collarbone)"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2012-05-14 12:46:01 [ERROR] - host0 is down (broke its collarbone)"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_TYPE", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_OBJECT", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_OBJECT", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "timestamp"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "alert_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "host"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "msg_title"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "msg_text"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "event_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "aggregation_key"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "event_object"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 1336999687}}, {"_type": "Constant", "_fields": {"kind": null, "value": "error"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "host1"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "host1 is down (got a bloody nose)"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2012-05-14 12:48:07 [ERROR] - host1 is down (got a bloody nose)"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_TYPE", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_OBJECT", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_OBJECT", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "timestamp"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "alert_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "host"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "msg_title"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "msg_text"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "event_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "aggregation_key"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "event_object"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 1336999923}}, {"_type": "Constant", "_fields": {"kind": null, "value": "success"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "host0"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "host0 is up (collarbone healed)"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2012-05-14 12:52:03 [RECOVERY] - host0 is up (collarbone healed)"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_TYPE", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_OBJECT", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_OBJECT", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "timestamp"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "alert_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "host"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "msg_title"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "msg_text"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "event_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "aggregation_key"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "event_object"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 1337000349}}, {"_type": "Constant", "_fields": {"kind": null, "value": "success"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "host1"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "host1 is up (nose stopped bleeding)"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "2012-05-14 12:59:09 [RECOVERY] - host1 is up (nose stopped bleeding)"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_TYPE", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_OBJECT", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_OBJECT", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}]}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "expected_output", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "log_data", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_write_log", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "logger", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "dogstreams"}}], "values": [{"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "name", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "log_file", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "Name", "_fields": {"id": "__name__", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "format", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "{0}:{1}:parse_events"}}}}, "keywords": []}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "init", "value": {"_type": "Name", "_fields": {"id": "Dogstreams", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "dogstream", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "config", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "check", "value": {"_type": "Name", "_fields": {"id": "dogstream", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "move_end", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "actual_output", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "expected_output", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "actual_output", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEquals", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_dogstream_events", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_dogstream_events(self):
log_data = [
'2012-05-14 12:46:01 [ERROR] - host0 is down (broke its collarbone)',
'2012-05-14 12:48:07 [ERROR] - host1 is down (got a bloody nose)',
'2012-05-14 12:52:03 [RECOVERY] - host0 is up (collarbone healed)',
'2012-05-14 12:59:09 [RECOVERY] - host1 is up (nose stopped bleeding)',
]
expected_output = {
"dogstreamEvents": [
{
"timestamp": 1336999561,
"alert_type": "error",
"host": "host0",
"msg_title": "host0 is down (broke its collarbone)",
"msg_text": "2012-05-14 12:46:01 [ERROR] - host0 is down (broke its collarbone)",
"event_type": EventDefaults.EVENT_TYPE,
"aggregation_key": EventDefaults.EVENT_OBJECT,
"event_object": EventDefaults.EVENT_OBJECT,
},
{
"timestamp": 1336999687,
"alert_type": "error",
"host": "host1",
"msg_title": "host1 is down (got a bloody nose)",
"msg_text": "2012-05-14 12:48:07 [ERROR] - host1 is down (got a bloody nose)",
"event_type": EventDefaults.EVENT_TYPE,
"aggregation_key": EventDefaults.EVENT_OBJECT,
"event_object": EventDefaults.EVENT_OBJECT,
},
{
"timestamp": 1336999923,
"alert_type": "success",
"host": "host0",
"msg_title": "host0 is up (collarbone healed)",
"msg_text": "2012-05-14 12:52:03 [RECOVERY] - host0 is up (collarbone healed)",
"event_type": EventDefaults.EVENT_TYPE,
"aggregation_key": EventDefaults.EVENT_OBJECT,
"event_object": EventDefaults.EVENT_OBJECT,
},
{
"timestamp": 1337000349,
"alert_type": "success",
"host": "host1",
"msg_title": "host1 is up (nose stopped bleeding)",
"msg_text": "2012-05-14 12:59:09 [RECOVERY] - host1 is up (nose stopped bleeding)",
"event_type": EventDefaults.EVENT_TYPE,
"aggregation_key": EventDefaults.EVENT_OBJECT,
"event_object": EventDefaults.EVENT_OBJECT,
},
]
}
self._write_log(log_data)
dogstream = Dogstreams.init(self.logger, {'dogstreams': '{0}:{1}:parse_events'.format(self.log_file.name, __name__)})
actual_output = dogstream.check(self.config, move_end=False)
self.assertEquals(expected_output, actual_output) | |
9,790 | [
0.06958894431591034,
-0.0017226794734597206,
0.005569793749600649,
-0.054930951446294785,
-0.0027179375756531954,
0.029681218788027763,
-0.00011432534665800631,
-0.03715630993247032,
0.03477012366056442,
0.03128824010491371,
0.03963989019393921,
0.005152820143848658,
-0.005286738742142916,
... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "msg_title"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "timestamp"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "title"}}, {"_type": "Constant", "_fields": {"kind": null, "value": 1336999561}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "msg_text"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "timestamp"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "body"}}, {"_type": "Constant", "_fields": {"kind": null, "value": 1336999561}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "none of the above"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "timestamp"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": "should get filtered out"}}, {"_type": "Constant", "_fields": {"kind": null, "value": 1336999561}}]}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "log_data", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "dogstreamEvents"}}], "values": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "timestamp"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "msg_title"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "event_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "aggregation_key"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "event_object"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 1336999561}}, {"_type": "Constant", "_fields": {"kind": null, "value": "title"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_TYPE", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_OBJECT", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_OBJECT", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "timestamp"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "msg_text"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "event_type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "aggregation_key"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "event_object"}}], "values": [{"_type": "Constant", "_fields": {"kind": null, "value": 1336999561}}, {"_type": "Constant", "_fields": {"kind": null, "value": "body"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_TYPE", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_OBJECT", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "EVENT_OBJECT", "value": {"_type": "Name", "_fields": {"id": "EventDefaults", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}]}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "expected_output", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "ListComp", "_fields": {"elt": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "d", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "repr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "generators": [{"_type": "comprehension", "_fields": {"ifs": [], "iter": {"_type": "Name", "_fields": {"id": "log_data", "ctx": {"_type": "Load", "_fields": {}}}}, "target": {"_type": "Name", "_fields": {"id": "d", "ctx": {"_type": "Store", "_fields": {}}}}, "is_async": 0}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "_write_log", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "logger", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "dogstreams"}}], "values": [{"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "name", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "log_file", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, {"_type": "Name", "_fields": {"id": "__name__", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "format", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "{0}:{1}:repr_event_parser"}}}}, "keywords": []}}]}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "init", "value": {"_type": "Name", "_fields": {"id": "Dogstreams", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "dogstream", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "config", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "check", "value": {"_type": "Name", "_fields": {"id": "dogstream", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "move_end", "value": {"_type": "Constant", "_fields": {"kind": null, "value": false}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "actual_output", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "expected_output", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Name", "_fields": {"id": "actual_output", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "assertEquals", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}], "name": "test_dogstream_events_validation", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def test_dogstream_events_validation(self):
log_data = [
{"msg_title": "title", "timestamp": 1336999561},
{"msg_text": "body", "timestamp": 1336999561},
{"none of the above": "should get filtered out", "timestamp": 1336999561},
]
expected_output = {
"dogstreamEvents": [
{
"timestamp": 1336999561,
"msg_title": "title",
"event_type": EventDefaults.EVENT_TYPE,
"aggregation_key": EventDefaults.EVENT_OBJECT,
"event_object": EventDefaults.EVENT_OBJECT,
},
{
"timestamp": 1336999561,
"msg_text": "body",
"event_type": EventDefaults.EVENT_TYPE,
"aggregation_key": EventDefaults.EVENT_OBJECT,
"event_object": EventDefaults.EVENT_OBJECT,
},
]
}
self._write_log([repr(d) for d in log_data])
dogstream = Dogstreams.init(self.logger, {'dogstreams': '{0}:{1}:repr_event_parser'.format(self.log_file.name, __name__)})
actual_output = dogstream.check(self.config, move_end=False)
self.assertEquals(expected_output, actual_output) | |
9,791 | [
0.0071828365325927734,
0.001174895209260285,
-0.006045014597475529,
0.010062442161142826,
0.025064432993531227,
0.013826420530676842,
-0.006497986614704132,
0.01826985739171505,
0.008412331342697144,
0.008067209273576736,
0.004219646565616131,
-0.04096158221364021,
0.03408072516322136,
-0.... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "GET"}}, "targets": [{"_type": "Name", "_fields": {"id": "GET", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "PUT"}}, "targets": [{"_type": "Name", "_fields": {"id": "PUT", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "POST"}}, "targets": [{"_type": "Name", "_fields": {"id": "POST", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "DELETE"}}, "targets": [{"_type": "Name", "_fields": {"id": "DELETE", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "name": "Method", "bases": [], "keywords": [], "type_params": [], "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "object_id", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "method", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "path", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "body", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "object_id", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "object_id", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "method", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "method", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "path", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "*"}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "txid", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "packed_object", "value": {"_type": "Name", "_fields": {"id": "body", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "body", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "test": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "body", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "packed_object"}}], "func": {"_type": "Name", "_fields": {"id": "hasattr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "orelse": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "body", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "body", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "name": "__init__", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "cls", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "packed", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Expr", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": 3}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "pop", "value": {"_type": "Name", "_fields": {"id": "packed", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}}}, {"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Starred", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "value": {"_type": "Name", "_fields": {"id": "packed", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "cls", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "create_from_packed", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "classmethod", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "object_id", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "method", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "txid", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "body", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}}}], "name": "packed_object", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "Request", "bases": [], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class Request:
class Method:
GET = "GET"
PUT = "PUT"
POST = "POST"
DELETE = "DELETE"
def __init__(self, object_id, method, path, body=None):
self.object_id = object_id
self.method = method
self.path = path
self.txid = '*'
if hasattr(body, "packed_object"):
body = body.packed_object()
self.body = body
@classmethod
def create_from_packed(cls, packed):
packed.pop(3)
return cls(*packed)
def packed_object(self):
return (self.object_id, self.method, self.path, self.txid, self.body) | |
9,792 | [
0.056036192923784256,
0.015690132975578308,
-0.026718055829405785,
0.042744409292936325,
0.014513373374938965,
0.0018688070122152567,
0.044268593192100525,
0.00881449319422245,
0.01669878512620926,
0.006270450074225664,
0.02192135900259018,
-0.015140979550778866,
0.06894692778587341,
-0.05... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "object_id", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "method", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "path", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "body", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": null}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "object_id", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "object_id", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "method", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "method", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "path", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "*"}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "txid", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}, {"_type": "If", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "packed_object", "value": {"_type": "Name", "_fields": {"id": "body", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "body", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}], "test": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "body", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "packed_object"}}], "func": {"_type": "Name", "_fields": {"id": "hasattr", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, "orelse": []}}, {"_type": "Assign", "_fields": {"value": {"_type": "Name", "_fields": {"id": "body", "ctx": {"_type": "Load", "_fields": {}}}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "body", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "name": "__init__", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def __init__(self, object_id, method, path, body=None):
self.object_id = object_id
self.method = method
self.path = path
self.txid = '*'
if hasattr(body, "packed_object"):
body = body.packed_object()
self.body = body | |
9,793 | [
0.011542197316884995,
0.024372665211558342,
0.0073350113816559315,
-0.017049258574843407,
0.03549124300479889,
-0.013451389968395233,
-0.027227748185396194,
-0.036883965134620667,
0.014739658683538437,
0.01815183274447918,
0.004178171046078205,
-0.0476311519742012,
-0.004851320758461952,
-... | 8 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "targets": [{"_type": "Name", "_fields": {"id": "DATA_NONE", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 1}}, "targets": [{"_type": "Name", "_fields": {"id": "DATA_URLS", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 2}}, "targets": [{"_type": "Name", "_fields": {"id": "DATA_COOKIES", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 3}}, "targets": [{"_type": "Name", "_fields": {"id": "DATA_FBADS", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 4}}, "targets": [{"_type": "Name", "_fields": {"id": "DATA_FB", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 5}}, "targets": [{"_type": "Name", "_fields": {"id": "DATA_FBLISTING", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "DATA_NONE", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "none"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "DATA_URLS", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "urls"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "DATA_COOKIES", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "cookies"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "DATA_FBADS", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "fbads"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "DATA_FB", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "fb"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "DATA_FBLISTING", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "fblisting"}}]}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "DATA_CHOICES", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "targets": [{"_type": "Name", "_fields": {"id": "STATUS_NEW", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 1}}, "targets": [{"_type": "Name", "_fields": {"id": "STATUS_DONE", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 2}}, "targets": [{"_type": "Name", "_fields": {"id": "STATUS_ERROR", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 3}}, "targets": [{"_type": "Name", "_fields": {"id": "STATUS_UNPROCESSED", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "STATUS_NEW", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "new"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "STATUS_DONE", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "done"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "STATUS_ERROR", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "error"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "STATUS_UNPROCESSED", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "unprocessed"}}]}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "STATUS_CHOICES", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "AUTH_USER_MODEL", "value": {"_type": "Name", "_fields": {"id": "settings", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ForeignKey", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "null", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "user", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "DateTimeField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "auto_now_add", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "created", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "SmallIntegerField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "choices", "value": {"_type": "Name", "_fields": {"id": "DATA_CHOICES", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Name", "_fields": {"id": "DATA_NONE", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "datatype", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "TextField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "data", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "SmallIntegerField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "choices", "value": {"_type": "Name", "_fields": {"id": "STATUS_CHOICES", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Name", "_fields": {"id": "STATUS_NEW", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "status", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "TextField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "null", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "error", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "status", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "STATUS_CHOICES", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "get_choice_name", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "status_str", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "RawData", "bases": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Model", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class RawData(models.Model):
DATA_NONE = 0
DATA_URLS = 1
DATA_COOKIES = 2
DATA_FBADS = 3
DATA_FB = 4
DATA_FBLISTING = 5
DATA_CHOICES = (
(DATA_NONE, 'none'),
(DATA_URLS, 'urls'),
(DATA_COOKIES, 'cookies'),
(DATA_FBADS, 'fbads'),
(DATA_FB, 'fb'),
(DATA_FBLISTING, 'fblisting')
)
STATUS_NEW = 0
STATUS_DONE = 1
STATUS_ERROR = 2
STATUS_UNPROCESSED = 3
STATUS_CHOICES = (
(STATUS_NEW, 'new'),
(STATUS_DONE, 'done'),
(STATUS_ERROR, 'error'),
(STATUS_UNPROCESSED, 'unprocessed'),
)
user = models.ForeignKey(settings.AUTH_USER_MODEL, null=True)
created = models.DateTimeField(auto_now_add=True)
datatype = models.SmallIntegerField(choices=DATA_CHOICES,
default=DATA_NONE)
data = models.TextField()
status = models.SmallIntegerField(choices=STATUS_CHOICES,
default=STATUS_NEW)
error = models.TextField(null=True)
def status_str(self):
return get_choice_name(self.status, self.STATUS_CHOICES) | |
9,794 | [
-0.018736669793725014,
-0.007802754174917936,
0.01908876746892929,
-0.0053349207155406475,
0.0010775156551972032,
-0.019466016441583633,
-0.0013816722203046083,
-0.01466238684952259,
-0.02438282035291195,
0.043106917291879654,
-0.012178835459053516,
-0.06886040419340134,
-0.00963240861892700... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "AUTH_USER_MODEL", "value": {"_type": "Name", "_fields": {"id": "settings", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ForeignKey", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "user", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "DateTimeField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Name", "_fields": {"id": "now", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "date", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "CharField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 128}}}}, {"_type": "keyword", "_fields": {"arg": "null", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "actor", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "CharField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 128}}}}, {"_type": "keyword", "_fields": {"arg": "null", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "target", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "PositiveIntegerField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "type_id", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "TextField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "null", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "text", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "TextField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "title", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "FBAdImage"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ManyToManyField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "related_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "sponsored_images"}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "images", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "FBAdLink"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ManyToManyField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "related_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "sponsored_links"}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "links", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "anon", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": true}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "date"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "title"}}], "values": [{"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "date", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "date_to_timestamp", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "title", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}}}], "name": "basic_data", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "anon", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": true}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "date"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "title"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "text"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "images"}}], "values": [{"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "date", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "date_to_timestamp", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Constant", "_fields": {"kind": null, "value": "fbsp"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "title", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "text", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "ListComp", "_fields": {"elt": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "thumbpath", "value": {"_type": "Name", "_fields": {"id": "i", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "generators": [{"_type": "comprehension", "_fields": {"ifs": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "thumbfile", "value": {"_type": "Name", "_fields": {"id": "i", "ctx": {"_type": "Load", "_fields": {}}}}}}], "iter": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "all", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "images", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "target": {"_type": "Name", "_fields": {"id": "i", "ctx": {"_type": "Store", "_fields": {}}}}, "is_async": 0}}]}}]}}}}], "name": "detail_data", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "FBSponsored", "bases": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Model", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class FBSponsored(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL)
date = models.DateTimeField(default=now)
actor = models.CharField(max_length=128, null=True)
target = models.CharField(max_length=128, null=True)
type_id = models.PositiveIntegerField(default=0)
text = models.TextField(null=True)
title = models.TextField()
images = models.ManyToManyField('FBAdImage', related_name='sponsored_images')
links = models.ManyToManyField('FBAdLink', related_name='sponsored_links')
def basic_data(self, anon=True):
return {'date': date_to_timestamp(self.date),
'id': self.id,
'title': self.title}
def detail_data(self, anon=True):
return {'date': date_to_timestamp(self.date),
'type': 'fbsp',
'id': self.id,
'title': self.title,
'text': self.text,
'images':
[i.thumbpath() for i in self.images.all() if i.thumbfile],
} | |
9,795 | [
0.013676056638360023,
0.02713767997920513,
0.03130720928311348,
-0.046079255640506744,
-0.00829140655696392,
-0.045245349407196045,
-0.021657725796103477,
-0.025588996708393097,
-0.009524396620690823,
-0.006975026801228523,
0.0021056123077869415,
-0.013116148300468922,
0.006564030423760414,
... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "anon", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": true}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "date"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "title"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "text"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "images"}}], "values": [{"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "date", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "date_to_timestamp", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Constant", "_fields": {"kind": null, "value": "fbsp"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "title", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "text", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "ListComp", "_fields": {"elt": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "thumbpath", "value": {"_type": "Name", "_fields": {"id": "i", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "generators": [{"_type": "comprehension", "_fields": {"ifs": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "thumbfile", "value": {"_type": "Name", "_fields": {"id": "i", "ctx": {"_type": "Load", "_fields": {}}}}}}], "iter": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "all", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "images", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "target": {"_type": "Name", "_fields": {"id": "i", "ctx": {"_type": "Store", "_fields": {}}}}, "is_async": 0}}]}}]}}}}], "name": "detail_data", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def detail_data(self, anon=True):
return {'date': date_to_timestamp(self.date),
'type': 'fbsp',
'id': self.id,
'title': self.title,
'text': self.text,
'images':
[i.thumbpath() for i in self.images.all() if i.thumbfile],
} | |
9,796 | [
0.013433939777314663,
0.0074762264266610146,
0.023524701595306396,
-0.01618930511176586,
0.011309246532619,
-0.03438696637749672,
-0.014119720086455345,
-0.0434245690703392,
-0.010360175743699074,
0.018724242225289345,
0.015846416354179382,
-0.03830571100115776,
0.018381353467702866,
-0.04... | 11 | {"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "anon", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": true}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "date"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "title"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "text"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "adid"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "images"}}], "values": [{"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "date", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "date_to_timestamp", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Constant", "_fields": {"kind": null, "value": "fbad"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "title", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "text", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "adid", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "ListComp", "_fields": {"elt": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "thumbpath", "value": {"_type": "Name", "_fields": {"id": "i", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "generators": [{"_type": "comprehension", "_fields": {"ifs": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "thumbfile", "value": {"_type": "Name", "_fields": {"id": "i", "ctx": {"_type": "Load", "_fields": {}}}}}}], "iter": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "all", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "images", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "target": {"_type": "Name", "_fields": {"id": "i", "ctx": {"_type": "Store", "_fields": {}}}}, "is_async": 0}}]}}]}}}}], "name": "detail_data", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "type_ignores": []}} | def detail_data(self, anon=True):
return {'date': date_to_timestamp(self.date),
'type': 'fbad',
'id': self.id,
'title': self.title,
'text': self.text,
'adid': self.adid,
'images':
[i.thumbpath() for i in self.images.all() if i.thumbfile],
} | |
9,797 | [
-0.022274862974882126,
-0.01731027290225029,
0.03562542423605919,
0.0007716050604358315,
0.021234093233942986,
-0.008254379965364933,
0.007638292387127876,
-0.05278018116950989,
-0.027036085724830627,
0.054933495819568634,
0.00006350601324811578,
-0.08847738057374954,
0.003310724161565304,
... | 12 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "AUTH_USER_MODEL", "value": {"_type": "Name", "_fields": {"id": "settings", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ForeignKey", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "user", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "DateTimeField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Name", "_fields": {"id": "now", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "date", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "CharField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 128}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "adid", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "TextField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "null", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "text", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "TextField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "null", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "title", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "FBAdImage"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ManyToManyField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "related_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "ad_images"}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "images", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "FBAdLink"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ManyToManyField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "related_name", "value": {"_type": "Constant", "_fields": {"kind": null, "value": "ad_links"}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "links", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "anon", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": true}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "date"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "title"}}], "values": [{"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "date", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "date_to_timestamp", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "title", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}}}], "name": "basic_data", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "anon", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, "value": true}}], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Dict", "_fields": {"keys": [{"_type": "Constant", "_fields": {"kind": null, "value": "date"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "type"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "id"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "title"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "text"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "adid"}}, {"_type": "Constant", "_fields": {"kind": null, "value": "images"}}], "values": [{"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "date", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "date_to_timestamp", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}, {"_type": "Constant", "_fields": {"kind": null, "value": "fbad"}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "id", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "title", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "text", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "adid", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "ListComp", "_fields": {"elt": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "thumbpath", "value": {"_type": "Name", "_fields": {"id": "i", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "generators": [{"_type": "comprehension", "_fields": {"ifs": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "thumbfile", "value": {"_type": "Name", "_fields": {"id": "i", "ctx": {"_type": "Load", "_fields": {}}}}}}], "iter": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "all", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "images", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}, "target": {"_type": "Name", "_fields": {"id": "i", "ctx": {"_type": "Store", "_fields": {}}}}, "is_async": 0}}]}}]}}}}], "name": "detail_data", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "FBAd", "bases": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Model", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class FBAd(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL)
date = models.DateTimeField(default=now)
adid = models.CharField(max_length=128)
text = models.TextField(null=True)
title = models.TextField(null=True)
images = models.ManyToManyField('FBAdImage', related_name='ad_images')
links = models.ManyToManyField('FBAdLink', related_name='ad_links')
def basic_data(self, anon=True):
return {'date': date_to_timestamp(self.date),
'id': self.id,
'title': self.title}
def detail_data(self, anon=True):
return {'date': date_to_timestamp(self.date),
'type': 'fbad',
'id': self.id,
'title': self.title,
'text': self.text,
'adid': self.adid,
'images':
[i.thumbpath() for i in self.images.all() if i.thumbfile],
} | |
9,798 | [
0.011850524693727493,
-0.009951886720955372,
-0.001032058265991509,
-0.008308721706271172,
0.012262768112123013,
0.019648298621177673,
0.024455860257148743,
-0.04993361979722977,
0.006375245749950409,
0.03404776006937027,
0.010938946157693863,
-0.07445915043354034,
0.0061952522955834866,
-... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "targets": [{"_type": "Name", "_fields": {"id": "STATUS_NEW", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 1}}, "targets": [{"_type": "Name", "_fields": {"id": "STATUS_DONE", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 2}}, "targets": [{"_type": "Name", "_fields": {"id": "STATUS_ERROR", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 3}}, "targets": [{"_type": "Name", "_fields": {"id": "STATUS_NO_MEDIA", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 4}}, "targets": [{"_type": "Name", "_fields": {"id": "STATUS_HAS_MEDIA", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 5}}, "targets": [{"_type": "Name", "_fields": {"id": "STATUS_NO_THUMB", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 6}}, "targets": [{"_type": "Name", "_fields": {"id": "STATUS_NO_DOWNLOAD", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "STATUS_NEW", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "new"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "STATUS_DONE", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "done"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "STATUS_ERROR", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "error"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "STATUS_NO_MEDIA", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "no media"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "STATUS_HAS_MEDIA", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "has media"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "STATUS_NO_THUMB", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "no thumb"}}]}}, {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id": "STATUS_NO_DOWNLOAD", "ctx": {"_type": "Load", "_fields": {}}}}, {"_type": "Constant", "_fields": {"kind": null, "value": "no download"}}]}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "STATUS_CHOICES", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "DomainName"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ForeignKey", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "null", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "domain", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "TextField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "unique", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "url", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "CharField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 128}}}}, {"_type": "keyword", "_fields": {"arg": "null", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "localfile", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "CharField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 128}}}}, {"_type": "keyword", "_fields": {"arg": "null", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "thumbfile", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "SmallIntegerField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "choices", "value": {"_type": "Name", "_fields": {"id": "STATUS_CHOICES", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Name", "_fields": {"id": "STATUS_NEW", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "status", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VAVS_THUMBNAILS_DIR", "value": {"_type": "Name", "_fields": {"id": "settings", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "thumbfile", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}], "test": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "thumbfile", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": ""}}}}]}}], "name": "thumbpath", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "status", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "STATUS_CHOICES", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Name", "_fields": {"id": "get_choice_name", "ctx": {"_type": "Load", "_fields": {}}}}, "keywords": []}}}}], "name": "status_str", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "FBAdImage", "bases": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Model", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class FBAdImage(models.Model):
STATUS_NEW = 0
STATUS_DONE = 1
STATUS_ERROR = 2
STATUS_NO_MEDIA = 3
STATUS_HAS_MEDIA = 4
STATUS_NO_THUMB = 5
STATUS_NO_DOWNLOAD = 6
STATUS_CHOICES = (
(STATUS_NEW, 'new'),
(STATUS_DONE, 'done'),
(STATUS_ERROR, 'error'),
(STATUS_NO_MEDIA, 'no media'),
(STATUS_HAS_MEDIA, 'has media'),
(STATUS_NO_THUMB, 'no thumb'),
(STATUS_NO_DOWNLOAD, 'no download'),
)
domain = models.ForeignKey('DomainName', null=True)
url = models.TextField(unique=True)
localfile = models.CharField(max_length=128, null=True)
thumbfile = models.CharField(max_length=128, null=True)
status = models.SmallIntegerField(choices=STATUS_CHOICES,
default=STATUS_NEW)
def thumbpath(self):
if self.thumbfile:
return os.path.join(settings.VAVS_THUMBNAILS_DIR, self.thumbfile)
else:
return ''
def status_str(self):
return get_choice_name(self.status, self.STATUS_CHOICES) | |
9,799 | [
0.011016583070158958,
-0.011208128184080124,
0.03150096908211708,
0.0008934213547036052,
0.010638965293765068,
0.007880715653300285,
0.018158480525016785,
-0.06238899752497673,
-0.03868117555975914,
0.0498674139380455,
0.002603646134957671,
-0.06519103050231934,
0.028589483350515366,
-0.04... | 10 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Constant", "_fields": {"kind": null, "value": "DomainName"}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ForeignKey", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "null", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "domain", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "TextField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "unique", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "url", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "CharField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 128}}}}, {"_type": "keyword", "_fields": {"arg": "null", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "localfile", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "CharField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "max_length", "value": {"_type": "Constant", "_fields": {"kind": null, "value": 128}}}}, {"_type": "keyword", "_fields": {"arg": "null", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "thumbfile", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "If", "_fields": {"body": [{"_type": "Return", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "VAVS_THUMBNAILS_DIR", "value": {"_type": "Name", "_fields": {"id": "settings", "ctx": {"_type": "Load", "_fields": {}}}}}}, {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "thumbfile", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "join", "value": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "path", "value": {"_type": "Name", "_fields": {"id": "os", "ctx": {"_type": "Load", "_fields": {}}}}}}}}, "keywords": []}}}}], "test": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "thumbfile", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": [{"_type": "Return", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": ""}}}}]}}], "name": "thumbpath", "returns": null, "type_params": [], "type_comment": null, "decorator_list": []}}], "name": "FBAdLink", "bases": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Model", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class FBAdLink(models.Model):
domain = models.ForeignKey('DomainName', null=True)
url = models.TextField(unique=True)
localfile = models.CharField(max_length=128, null=True)
thumbfile = models.CharField(max_length=128, null=True)
def thumbpath(self):
if self.thumbfile:
return os.path.join(settings.VAVS_THUMBNAILS_DIR, self.thumbfile)
else:
return '' | |
9,800 | [
-0.047124721109867096,
-0.014496585354208946,
0.018564283847808838,
-0.02579093910753727,
0.005403764545917511,
0.01034774910658598,
-0.013252475298941135,
-0.017038896679878235,
0.012224731966853142,
0.028452252969145775,
0.01345802377909422,
-0.04612943157553673,
0.04255937784910202,
-0.... | 9 | {"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "AUTH_USER_MODEL", "value": {"_type": "Name", "_fields": {"id": "settings", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "ForeignKey", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Name", "_fields": {"id": "user", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "DateTimeField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "default", "value": {"_type": "Name", "_fields": {"id": "now", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "date", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "TextField", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": [{"_type": "keyword", "_fields": {"arg": "null", "value": {"_type": "Constant", "_fields": {"kind": null, "value": true}}}}]}}, "targets": [{"_type": "Name", "_fields": {"id": "data", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": null}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "IfExp", "_fields": {"body": {"_type": "Call", "_fields": {"args": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "data", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "loads", "value": {"_type": "Name", "_fields": {"id": "json", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "test": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "data", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}, "orelse": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": []}}}}}}], "name": "listing", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Name", "_fields": {"id": "property", "ctx": {"_type": "Load", "_fields": {}}}}]}}, {"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "list_data", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "list_data", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "dumps", "value": {"_type": "Name", "_fields": {"id": "json", "ctx": {"_type": "Load", "_fields": {}}}}}}, "keywords": []}}, "targets": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Store", "_fields": {}}, "attr": "data", "value": {"_type": "Name", "_fields": {"id": "self", "ctx": {"_type": "Load", "_fields": {}}}}}}], "type_comment": null}}], "name": "listing", "returns": null, "type_params": [], "type_comment": null, "decorator_list": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "setter", "value": {"_type": "Name", "_fields": {"id": "listing", "ctx": {"_type": "Load", "_fields": {}}}}}}]}}], "name": "FBListing", "bases": [{"_type": "Attribute", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "attr": "Model", "value": {"_type": "Name", "_fields": {"id": "models", "ctx": {"_type": "Load", "_fields": {}}}}}}], "keywords": [], "type_params": [], "decorator_list": []}}], "type_ignores": []}} | class FBListing(models.Model):
user = models.ForeignKey(settings.AUTH_USER_MODEL)
date = models.DateTimeField(default=now)
data = models.TextField(null=True)
@property
def listing(self):
return json.loads(self.data) if self.data else []
@listing.setter
def listing(self, list_data):
self.data = json.dumps(list_data) |