Commit Graph

70 Commits

Author SHA1 Message Date
Hugo van Kemenade
51bd7d2ea8
Drop support for Python 3.8 (#8183)
Co-authored-by: Andrew Murray <radarhere@users.noreply.github.com>
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2024-07-03 00:44:45 -06:00
Hugo van Kemenade
e50df021e8 Add support for Python 3.13 2024-07-02 21:48:48 +03:00
Andrew Murray
43cc1e3659 Removed PyAccess and Image.USE_CFFI_ACCESS 2024-07-01 20:31:17 +10:00
Andrew Murray
380bc1766b
Merge pull request #7813 from hugovk/requirements-mypy
Install mypy from requirements file
2024-02-20 08:17:37 +11:00
Hugo van Kemenade
fe1edb1e0f Install mypy from requirements file
So Renovate can update it on a schedule
2024-02-19 16:48:44 +02:00
Andrew Murray
96fc60d5d2 Removed mypy excludes 2024-02-17 20:21:25 +11:00
Andrew Murray
19a6edeecc Added type hints 2024-02-10 19:50:45 +11:00
Andrew Murray
10cf2f2651 Added type hints 2024-01-13 14:40:59 +11:00
pre-commit-ci[bot]
0d90bc8187 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-12-27 13:57:22 +00:00
Nulano
3a4298d16c avoid hard dependency on typing_extensions 2023-12-27 14:55:30 +01:00
Hugo van Kemenade
acc8f95f9b
Add NumPy to tox for mypy
Co-authored-by: Andrew Murray <3112309+radarhere@users.noreply.github.com>
2023-12-19 11:25:42 +02:00
Hugo van Kemenade
b8605eaa84 Check types with mypy 2023-12-19 09:23:43 +02:00
Hugo van Kemenade
ab990fab77 Add support for Python 3.12 2023-07-12 16:31:45 +03:00
Andrew Murray
18da2d0b2d Removed inplace target 2023-05-20 15:38:53 +10:00
pre-commit-ci[bot]
a766fa4cd1 [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
2023-05-01 19:16:03 +00:00
Hugo van Kemenade
6c057b3277 Run tox-ini-fmt 2023-04-03 23:08:23 +03:00
Hugo van Kemenade
596569c928 Drop support for soon-EOL Python 3.7 2023-04-01 15:58:08 +03:00
Hugo van Kemenade
bfa1f3290c Add allowlist_externals=make to fix tox 4 2022-12-13 18:06:58 +02:00
Hugo van Kemenade
1f9754cdc0 Format tox.ini with tox-ini-fmt 2022-12-13 18:04:30 +02:00
Hugo van Kemenade
6801a255a3 Add support for Python 3.11 2022-07-15 13:42:36 +03:00
Hugo van Kemenade
b14aa51037 Replace requirements.txt with extras_require 2022-02-24 17:59:34 +02:00
Andrew Murray
c202fc7f93 Replaced further direct invocations of setup.py 2021-12-24 11:12:51 +11:00
Hugo van Kemenade
716a0baf74 Drop support for EOL Python 3.6 2021-10-19 15:34:52 +03:00
Hugo van Kemenade
e7d1b2f4cb Add support for Python 3.10 2021-07-01 13:29:44 +03:00
Andrew Murray
6a50e1076a Invoke pip using Python 2020-10-29 22:41:29 +11:00
Hugo van Kemenade
6f7231eb5a Add Trove classifier, update setup.py version check, add to tox.ini 2020-10-06 19:16:49 +03:00
Hugo
6cdeb55118 Drop support for soon-EOL Python 3.5 2020-06-30 13:55:08 +03:00
Hugo
7e3556e5f6 GHA: Force colour output of pre-commit 2020-06-22 12:27:08 +03:00
Hugo
c4c1b51f45 pre-commit: when hooks fail, run 'git diff' directly afterwards 2020-06-22 12:27:08 +03:00
Hugo
995707f3ad Run lint with pre-commit 2020-03-22 10:36:55 +02:00
Andrew Murray
1671f6bd71 Show all warnings 2020-01-26 17:48:28 -08:00
Jon Dufresne
2b84221edf Fix ResourceWarning emitted during tests
Appeared in the form:

    ResourceWarning: unclosed file <_io.BufferedReader name='Tests/images/invalid-exif-without-x-resolution.jpg'>

Enable all warnings to always display during tests to help catch these
warnings earlier.
2020-01-26 16:00:46 -08:00
Hugo
6f88d8dd6b black --target-version py35 2019-11-02 20:02:07 +02:00
Hugo van Kemenade
40133cfc74
Merge branch 'master' into rm-2.7 2019-10-26 09:07:44 +03:00
Hugo
2ab518edcb Add support for Python 3.8 2019-10-15 12:44:21 +03:00
Hugo van Kemenade
28ff798889
Merge branch 'master' into rm-2.7 2019-10-15 12:11:43 +03:00
Jon Dufresne
911079cc68 Add PyPy3 to the tox test matrix
Allows contributors to automatically test locally.
2019-10-12 07:56:43 -07:00
Hugo
af770a6c55 Drop support for EOL Python 2.7 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
Hugo
471220093b Format with Black 2019-06-13 18:54:57 +03:00
Hugo
2bedb83a84 Check Black during CI lint 2019-06-10 18:18:47 +03:00
Hugo
1885a2cef5
Merge pull request #3579 from jdufresne/run-one-test
Improve pytest configuration to allow specific tests as CLI args
2019-02-03 11:30:57 +02:00
Hugo
84248dc642
Merge branch 'master' into tox-flake8 2019-01-27 10:53:30 +02:00
Hugo
d6055440d5 Drop support for EOL Python 3.4 2019-01-24 23:33:14 +02:00
Jon Dufresne
7da17ad41e Improve pytest configuration to allow specific tests as CLI args
The previous test configuration made it difficult to run a single test
with the pytest CLI. There were two major issues:

- The Tests directory was not a package. It now includes a __init__.py
  file and imports from other tests modules are done with relative
  imports.

- setup.cfg always specified the Tests directory. So even if a specific
  test were specified as a CLI arg, this configuration would also always
  include all tests. This configuration has been removed to allow
  specifying a single test on the command line.

Contributors can now run specific tests with a single command such as:

  $ tox -e py37 -- Tests/test_file_pdf.py::TestFilePdf.test_rgb

This makes it easy and faster to iterate on a single test failure and is
very familiar to those that have previously used tox and pytest.

When running tox or pytest with no arguments, they still discover and
runs all tests in the Tests directory.
2019-01-13 09:00:12 -08:00
Jon Dufresne
e19d8dd84b Add linting to the tox matrix
Allows contributors to easily run the lint stage with a single command:
`tox -e lint`. This creates shorter round trips with CI in case of an
error.

Update the Travis configuration to use the new environment to run lint.
This allows using a single/common source of truth to reduce differences
between Travis and local testing.

The tox environment uses the skip_install feature as static analysis
doesn't requiring install the Pillow package itself to run. This feature
requires tox 1.9 (2015-02-24), so a minimum tox version was added to the
configuration.

https://tox.readthedocs.io/en/latest/config.html#conf-skip_install
2019-01-13 08:55:06 -08:00
Jon Dufresne
45740b4a28 Install optional dependencies in tox environment
Improves test coverage by reducing skipped tests when testing through
tox.
2019-01-07 21:12:07 -08:00
Hugo
fe0b78b98d Support Python 3.7 2018-04-05 13:52:48 +03:00
Jerome Leclanche
31409bc83d tox: Allow passing arguments from tox to pytest 2018-03-06 18:16:26 +02:00
Jerome Leclanche
d2c73c4882 tox: Add pytest to test deps 2018-03-06 18:16:26 +02:00