Commit 9799022716071ab2333edfb3ea96a6df8004a53d
1 parent
f1c708ac
xls_parser: rename type to rec_type to make pylint happier
Showing
1 changed file
with
7 additions
and
7 deletions
oletools/xls_parser.py
| ... | ... | @@ -134,7 +134,7 @@ class XlsStream(OleRecordStream): |
| 134 | 134 | return rec_type, rec_size, None |
| 135 | 135 | |
| 136 | 136 | @classmethod |
| 137 | - def record_class_for_type(cls, type): | |
| 137 | + def record_class_for_type(cls, rec_type): | |
| 138 | 138 | """ determine a class for given record type |
| 139 | 139 | |
| 140 | 140 | returns (clz, force_read) |
| ... | ... | @@ -146,16 +146,16 @@ class WorkbookStream(XlsStream): |
| 146 | 146 | """ Stream in excel file that holds most info """ |
| 147 | 147 | |
| 148 | 148 | @classmethod |
| 149 | - def record_class_for_type(cls, type): | |
| 149 | + def record_class_for_type(cls, rec_type): | |
| 150 | 150 | """ determine a class for given record type |
| 151 | 151 | |
| 152 | 152 | returns (clz, force_read) |
| 153 | 153 | """ |
| 154 | - if type == XlsRecordBof.TYPE: | |
| 154 | + if rec_type == XlsRecordBof.TYPE: | |
| 155 | 155 | return XlsRecordBof, True |
| 156 | - elif type == XlsRecordEof.TYPE: | |
| 156 | + elif rec_type == XlsRecordEof.TYPE: | |
| 157 | 157 | return XlsRecordEof, False |
| 158 | - elif type == XlsRecordSupBook.TYPE: | |
| 158 | + elif rec_type == XlsRecordSupBook.TYPE: | |
| 159 | 159 | return XlsRecordSupBook, True |
| 160 | 160 | else: |
| 161 | 161 | return XlsRecord, False |
| ... | ... | @@ -192,12 +192,12 @@ class XlsbStream(OleRecordStream): |
| 192 | 192 | return rec_type, rec_size, None |
| 193 | 193 | |
| 194 | 194 | @classmethod |
| 195 | - def record_class_for_type(cls, type): | |
| 195 | + def record_class_for_type(cls, rec_type): | |
| 196 | 196 | """ determine a class for given record type |
| 197 | 197 | |
| 198 | 198 | returns (clz, force_read) |
| 199 | 199 | """ |
| 200 | - if type == XlsbBeginSupBook.TYPE: | |
| 200 | + if rec_type == XlsbBeginSupBook.TYPE: | |
| 201 | 201 | return XlsbBeginSupBook, True |
| 202 | 202 | else: |
| 203 | 203 | return XlsbRecord, False | ... | ... |