Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit 966f0b5

Browse files
committed
Update stylecheck warnings
1 parent 7119fa2 commit 966f0b5

1 file changed

Lines changed: 9 additions & 7 deletions

File tree

mhtml.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ def __init__(self, content, headers, header_length, boundary):
3232
logger.debug('Got no boundary? Try to get from header')
3333
boundary = get_boundary(headers)
3434
if boundary is None:
35-
logger.warning('Found no boundary in headers? Should create one?')
35+
logger.warning('Found no boundary in headers? '
36+
'Should create one?')
3637
# TODO: create boundary?
3738

3839
self._headers = headers
@@ -64,7 +65,7 @@ def content(self):
6465
@property
6566
def content_hash(self):
6667
import hashlib
67-
m = hashlib.sha256()
68+
m = hashlib.sha256() # pylint: disable=invalid-name
6869
m.update(self.content)
6970
return m.digest()
7071

@@ -370,7 +371,7 @@ def parse(cls, encoding):
370371

371372
encoding = encoding.lower()
372373

373-
for ce in (cls.BINARY, cls.BASE64, cls.QUOTEDPRINTABLE, cls.SEVENBIT,
374+
for ce in (cls.BINARY, cls.BASE64, cls.QUOTEDPRINTABLE, cls.SEVENBIT, # noqa: E501 pylint: disable=invalid-name
374375
cls.EIGHTBIT):
375376
if ce.value == encoding:
376377
return ce
@@ -386,7 +387,8 @@ def __init__(self, mhtml_file, headers,
386387

387388
if not isinstance(headers, ResourceHeader):
388389
if isinstance(headers, (list, dict)):
389-
logger.debug('Converting list/dict headers into ResourceHeader')
390+
logger.debug('Converting list/dict headers into '
391+
'ResourceHeader')
390392
headers = ResourceHeader(headers)
391393
else:
392394
logger.warning('headers given are not from type %s: %s',
@@ -438,14 +440,14 @@ def content_with_headers(self):
438440
@property
439441
def content_hash(self):
440442
import hashlib
441-
m = hashlib.sha256()
443+
m = hashlib.sha256() # pylint: disable=invalid-name
442444
m.update(self.content)
443445
return m.digest()
444446

445447
@property
446448
def content_with_headers_hash(self):
447449
import hashlib
448-
m = hashlib.sha256()
450+
m = hashlib.sha256() # pylint: disable=invalid-name
449451
m.update(self.content_with_headers)
450452
return m.digest()
451453

@@ -469,7 +471,7 @@ def get_content(self, decode=False):
469471
encoding = ContentEncoding.parse(encoding)
470472

471473
if encoding in (ContentEncoding.BINARY, ContentEncoding.SEVENBIT,
472-
ContentEncoding.EIGHTBIT):
474+
ContentEncoding.EIGHTBIT):
473475
return content
474476

475477
if encoding is ContentEncoding.BASE64:

0 commit comments

Comments
 (0)