Skip to content

Commit

Permalink
fixed flake8 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Rik Starmans committed Nov 16, 2023
1 parent f20ddc2 commit 77de11e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
13 changes: 13 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Install the pre-commit hooks below with
# 'pre-commit install'

# Run the hooks on all files with
# 'pre-commit run --all'

repos:

Check warning on line 7 in .pre-commit-config.yaml

View workflow job for this annotation

GitHub Actions / build

7:1 [document-start] missing document start "---"
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies: [flake8-bugbear, flake8-print]
args: [--ignore=T201]
6 changes: 3 additions & 3 deletions winbond/winbond.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,10 @@ def writeblocks(self, blocknum: int, buf: list) -> None:
:type buf: list
"""
buf_len = len(buf)
if buf_len % self.BLOCK_SIZE != 0:
if buf_len % self.BLOCK_SIZE != 0:
# appends xFF dummy bytes
buf += bytearray((self.BLOCK_SIZE - buf_len)*[255])
buf += bytearray((self.BLOCK_SIZE - buf_len) * [255])

if buf_len == self.BLOCK_SIZE:
self._writeblock(blocknum=blocknum, buf=buf)
else:
Expand Down

0 comments on commit 77de11e

Please sign in to comment.