pytest-qt icon indicating copy to clipboard operation
pytest-qt copied to clipboard

Modernize/improve various development things

Open The-Compiler opened this issue 9 months ago • 2 comments

I noticed a couple of things while picking up work on pytest-qt again:

  • [ ] One test uses tmpdir instead of tmp_path
  • [ ] All tests use testdir instead of pytester
  • [ ] We might want to switch from autoflake/pyupgrade/black/flake8 to ruff?
  • [ ] We should switch from setup.py to a pyproject.toml (and maybe uv?)
  • [ ] License PyPI classifiers are deprected, we should use a SPDX license
  • [ ] We should force colored pytest output on GitHub Actions
  • [ ] We should have type annotations and use mypy on CI (and then probably add py.typed too)

Thoughts? We should probably split this into more bite-sized issues, just writing down what went through my head before I forget everything again.

The-Compiler avatar Mar 21 '25 16:03 The-Compiler

Thanks!

We might want to switch from autoflake/pyupgrade/black/flake8 to ruff?

Seems sensible to follow pytest's lead here.

We should have type annotations and use mypy on CI (and then probably add py.typed too)

I would love that, but I recall some effort in that direction in the past, and at the time we hit some problems due to qt_compat, as the actual classes change at import time. But we should give it a go again.

Other than the above, all sound good to me.

just writing down what went through my head before I forget everything again.

Sure thing, that's great.

We should probably split this into more bite-sized issues

Not sure we need, I would be perfectly OK with PRs that solve one or more of those issues (in separate commits of course). We then close this issue when the last item of that list is checked.

On the other hand it might be a good opportunity to use that new "Create sub-issue" button. 😁

nicoddemus avatar Mar 21 '25 18:03 nicoddemus

One more: master -> main 😉

The-Compiler avatar Mar 21 '25 20:03 The-Compiler