-
Notifications
You must be signed in to change notification settings - Fork 11
Move code into repo #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This reverts commit 799dbf3.
|
Um... why isn't travis running checks on this? |
|
there's no code you commited? |
This reverts commit b186fdb.
|
OK... I've had some git weirdness happening with the one. I think it's good now (and it's checking). |
|
@dastels Ran into an error with a PyGamer running CircuitPython 4.1.0-beta and the simpletest example in this PR. |
|
Yes. It requires 5.0 |
|
@dastels Ok, could you update the README.rst to reflect the requirement for CircuitPython 5.0? |
adafruit_bitmapsaver.py
Outdated
| :param bitmap: the displayio.Bitmap to save | ||
| :param palette: the displayio.Palette to use for looking up colors in the bitmap | ||
| """ | ||
| print("Saving bitmap") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Library should not print.
adafruit_bitmapsaver.py
Outdated
| output_file = file_or_filename | ||
|
|
||
| filesize = 54 + bitmap.height * _bytes_per_row(bitmap) | ||
| # print('Bitmap height: ', bitmap.height) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove or add a debug kwarg
adafruit_bitmapsaver.py
Outdated
| _write_dib_header(output_file, bitmap) | ||
| _write_pixels(output_file, bitmap, palette) | ||
| except Exception: | ||
| print('Error saving bitmap') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you raise instead of printing here?
adafruit_bitmapsaver.py
Outdated
| raise | ||
| else: | ||
| output_file.close() | ||
| print("Finished saving bitmap") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print used again. Possibly return if bitmap was saved successfully.
adafruit_bitmapsaver.py
Outdated
| """ | ||
| print("Saving bitmap") | ||
| if not isinstance(bitmap, Bitmap): | ||
| raise ValueError('bitmap') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you make these exceptions more verbose as to why the file is not accepted?
adafruit_bitmapsaver.py
Outdated
| __version__ = "0.0.0-auto.0" | ||
| __repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_BitmapSaver.git" | ||
|
|
||
| #pylint:disable=line-too-long,broad-except,redefined-outer-name,invalid-name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hiya don't disable these, they're there for a reason! please lint the code so these errors don't come up.
No description provided.