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,7 +134,7 @@ class XlsStream(OleRecordStream): | ||
| 134 | return rec_type, rec_size, None | 134 | return rec_type, rec_size, None |
| 135 | 135 | ||
| 136 | @classmethod | 136 | @classmethod |
| 137 | - def record_class_for_type(cls, type): | 137 | + def record_class_for_type(cls, rec_type): |
| 138 | """ determine a class for given record type | 138 | """ determine a class for given record type |
| 139 | 139 | ||
| 140 | returns (clz, force_read) | 140 | returns (clz, force_read) |
| @@ -146,16 +146,16 @@ class WorkbookStream(XlsStream): | @@ -146,16 +146,16 @@ class WorkbookStream(XlsStream): | ||
| 146 | """ Stream in excel file that holds most info """ | 146 | """ Stream in excel file that holds most info """ |
| 147 | 147 | ||
| 148 | @classmethod | 148 | @classmethod |
| 149 | - def record_class_for_type(cls, type): | 149 | + def record_class_for_type(cls, rec_type): |
| 150 | """ determine a class for given record type | 150 | """ determine a class for given record type |
| 151 | 151 | ||
| 152 | returns (clz, force_read) | 152 | returns (clz, force_read) |
| 153 | """ | 153 | """ |
| 154 | - if type == XlsRecordBof.TYPE: | 154 | + if rec_type == XlsRecordBof.TYPE: |
| 155 | return XlsRecordBof, True | 155 | return XlsRecordBof, True |
| 156 | - elif type == XlsRecordEof.TYPE: | 156 | + elif rec_type == XlsRecordEof.TYPE: |
| 157 | return XlsRecordEof, False | 157 | return XlsRecordEof, False |
| 158 | - elif type == XlsRecordSupBook.TYPE: | 158 | + elif rec_type == XlsRecordSupBook.TYPE: |
| 159 | return XlsRecordSupBook, True | 159 | return XlsRecordSupBook, True |
| 160 | else: | 160 | else: |
| 161 | return XlsRecord, False | 161 | return XlsRecord, False |
| @@ -192,12 +192,12 @@ class XlsbStream(OleRecordStream): | @@ -192,12 +192,12 @@ class XlsbStream(OleRecordStream): | ||
| 192 | return rec_type, rec_size, None | 192 | return rec_type, rec_size, None |
| 193 | 193 | ||
| 194 | @classmethod | 194 | @classmethod |
| 195 | - def record_class_for_type(cls, type): | 195 | + def record_class_for_type(cls, rec_type): |
| 196 | """ determine a class for given record type | 196 | """ determine a class for given record type |
| 197 | 197 | ||
| 198 | returns (clz, force_read) | 198 | returns (clz, force_read) |
| 199 | """ | 199 | """ |
| 200 | - if type == XlsbBeginSupBook.TYPE: | 200 | + if rec_type == XlsbBeginSupBook.TYPE: |
| 201 | return XlsbBeginSupBook, True | 201 | return XlsbBeginSupBook, True |
| 202 | else: | 202 | else: |
| 203 | return XlsbRecord, False | 203 | return XlsbRecord, False |