Commit Graph

27 Commits

Author SHA1 Message Date
Andrew Murray
4500acb274 Lint fixes 2020-04-04 15:02:02 +11:00
panjing
b685c18e95 Save in icns format to support all operating systems. 2020-04-04 11:22:11 +08:00
Andrew Murray
dd8b0de666 Close excusively opened images 2020-02-18 20:49:05 +11:00
Andrew Murray
6e130e9f63 Close file pointer in __main__ 2020-02-17 22:12:46 +11:00
Andrew Murray
bd7242228b Fixed saving bug in __main__ 2020-02-17 22:11:24 +11:00
Hugo
3a34081db5 Simplify temporary directory cleanup
Co-Authored-By: Jon Dufresne <jon.dufresne@gmail.com>
2019-10-08 17:25:55 +03:00
Hugo
84e53e3757 Simplify using subprocess.DEVNULL
Co-Authored-By: Jon Dufresne <jon.dufresne@gmail.com>
2019-10-08 17:25:42 +03:00
Andrew Murray
6cd99fc3cf
Merge branch 'master' into rm-2.7 2019-10-08 18:57:27 +11:00
Jon Dufresne
64032061c0 Move several imports to the top-level of the file
This better follows PEP 8 style guide:

https://www.python.org/dev/peps/pep-0008/#imports

> Imports are always put at the top of the file, just after any module
> comments and docstrings, and before module globals and constants.

This also avoids duplicate import code within the same file.
2019-10-07 06:28:36 -07:00
Hugo
538d9e2e5d Upgrade Python syntax with pyupgrade --py3-plus 2019-10-07 14:30:59 +03:00
Jon Dufresne
d50445ff30 Introduce isort to automate import ordering and formatting
Similar to the recent adoption of Black. isort is a Python utility to
sort imports alphabetically and automatically separate into sections. By
using isort, contributors can quickly and automatically conform to the
projects style without thinking. Just let the tool do it.

Uses the configuration recommended by the Black to avoid conflicts of
style.

Rewrite TestImageQt.test_deprecated to no rely on import order.
2019-07-06 16:11:35 -07:00
Andrew Murray
f7d7a80b5b Allow ICNS to change size as ICO does 2019-06-12 02:19:58 +10:00
Hugo
53a7e35004 Format with Black 2019-06-10 18:22:46 +03:00
Jon Dufresne
a00fc33c04 Replace .seek() magic numbers with io.SEEK_* constants
A bit more readable.

https://docs.python.org/3/library/io.html#io.IOBase.seek
2019-01-12 18:22:07 -08:00
Andrew Murray
b637b5f7a2 Close exclusive fp before discarding 2018-11-13 22:13:55 +11:00
Andrew Murray
f2d4d19cc4 Undefined name 2018-10-21 18:00:52 +11:00
Andrew Murray
77f807cf73 Continuation line under-indented for visual indent 2018-10-21 17:59:27 +11:00
Andrew Murray
0adeb82e98 Changed Image size property to be read-only by default 2018-09-30 13:45:18 +10:00
Andrew Murray
bf77bba323 Changed dictionary comprehension style 2018-04-18 16:00:57 +10:00
Andrew Murray
cbc056f43d Fixed whitespace 2018-04-18 16:00:57 +10:00
Andrew Murray
2123dd70fb Allow append_images to set .icns scaled images 2018-03-19 19:38:07 +11:00
Andrew Murray
6af53a7303 Improved efficient saving by copying the saved image, instead of saving the same image twice 2018-03-11 22:14:49 +11:00
Andrew Murray
de80b8f36b Fixed efficient saving 2018-03-11 22:01:06 +11:00
Andrew Murray
2202196162 Flake8 blank line fixes 2018-03-04 21:36:33 +11:00
Andrew Murray
b7aab522e1 Added syntax print statements 2018-01-06 21:57:29 +11:00
Andrew Murray
59b9d1dc46 Simplified Image.open call 2018-01-06 21:57:29 +11:00
wiredfool
0bb3f4fee9 source layout reorg 2017-12-28 14:49:47 +00:00