| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 02b6003 commit ae147d0
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -548,8 +548,6 @@ def permute_optional_groups(left, required, right): | |||
| 548 | 548 | If required is empty, left must also be empty. | |
| 549 | 549 | """ | |
| 550 | 550 | required = tuple(required) | |
| 551 | - result = [] | ||
| 552 | - | ||
| 553 | 551 | if not required: | |
| 554 | 552 | if left: | |
| 555 | 553 | raise ValueError("required is empty but left is not") | |
@@ -1338,7 +1336,6 @@ def render_option_group_parsing(self, f, template_dict): | |||
| 1338 | 1336 | if isinstance(parameters[0].converter, self_converter): | |
| 1339 | 1337 | del parameters[0] | |
| 1340 | 1338 | ||
| 1341 | - groups = [] | ||
| 1342 | 1339 | group = None | |
| 1343 | 1340 | left = [] | |
| 1344 | 1341 | right = [] | |
@@ -1428,8 +1425,6 @@ def render_function(self, clinic, f): | |||
| 1428 | 1425 | first_optional = len(selfless) | |
| 1429 | 1426 | positional = selfless and selfless[-1].is_positional_only() | |
| 1430 | 1427 | new_or_init = f.kind in (METHOD_NEW, METHOD_INIT) | |
| 1431 | - default_return_converter = (not f.return_converter or | ||
| 1432 | - f.return_converter.type == 'PyObject *') | ||
| 1433 | 1428 | has_option_groups = False | |
| 1434 | 1429 | ||
| 1435 | 1430 | # offset i by -1 because first_optional needs to ignore self | |
@@ -1526,7 +1521,6 @@ def render_function(self, clinic, f): | |||
| 1526 | 1521 | template_dict['return_value'] = data.return_value | |
| 1527 | 1522 | ||
| 1528 | 1523 | # used by unpack tuple code generator | |
| 1529 | - ignore_self = -1 if isinstance(converters[0], self_converter) else 0 | ||
| 1530 | 1524 | unpack_min = first_optional | |
| 1531 | 1525 | unpack_max = len(selfless) | |
| 1532 | 1526 | template_dict['unpack_min'] = str(unpack_min) | |
@@ -1803,10 +1797,8 @@ def is_stop_line(line): | |||
| 1803 | 1797 | if self.verify: | |
| 1804 | 1798 | if 'input' in d: | |
| 1805 | 1799 | checksum = d['output'] | |
| 1806 | - input_checksum = d['input'] | ||
| 1807 | 1800 | else: | |
| 1808 | 1801 | checksum = d['checksum'] | |
| 1809 | - input_checksum = None | ||
| 1810 | 1802 | ||
| 1811 | 1803 | computed = compute_checksum(output, len(checksum)) | |
| 1812 | 1804 | if checksum != computed: | |
@@ -4243,8 +4235,7 @@ def directive_version(self, required): | |||
| 4243 | 4235 | fail("Insufficient Clinic version!\n Version: " + version + "\n Required: " + required) | |
| 4244 | 4236 | ||
| 4245 | 4237 | def directive_module(self, name): | |
| 4246 | - fields = name.split('.') | ||
| 4247 | - new = fields.pop() | ||
| 4238 | + fields = name.split('.')[:-1] | ||
| 4248 | 4239 | module, cls = self.clinic._module_and_class(fields) | |
| 4249 | 4240 | if cls: | |
| 4250 | 4241 | fail("Can't nest a module inside a class!") | |
| Back | FazBrowse Home | New Git URL |
0 commit comments