Skip to content
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

pyproject.toml: stop linting in venvs #20154

Merged

Conversation

allisonkarlitskaya
Copy link
Member

Lacking a proper requirements.txt file, we're at the mercy of whatever
got randomly uploaded to pypy last night, and we've been seeing a lot of
breaks lately.

We already run our ruff/mypy/etc. stuff as part of our unit tests
workflow, so let's stop running it in venv. The idea is that we should
pass against the current version of the tasks container (which will
probably shift at some point to being our pinned version of the tasks
container).

While we're at it, drop Python 3.7 (which the world seems to have
collectively decided to stop caring about) and add Python 3.13 (which
has been in Fedora 39 for a while already). Note: we do not drop
Python 3.6 — although it is no longer an officially supported release,
it's used in RHEL 7 and RHEL 8 and Fedora intends to keep packaging it.

@allisonkarlitskaya allisonkarlitskaya added the no-test For doc/workflow changes, or experiments which don't need a full CI run, label Mar 11, 2024
@allisonkarlitskaya
Copy link
Member Author

From the unit-tests run:

WARNING: skipping /static-code/test-mypy: no mypy
not ok 9 /static-code/test-ruff
# test/pytest/test_samples.py:18:1: I001 [*] Import block is un-sorted or un-formatted
# Found 1 error.
# [*] 1 fixable with the `--fix` option.
WARNING: skipping /static-code/test-vulture: no vulture
FAIL test/static-code (exit status: 1)

OK, so good — ruff caught one of the problems, but clearly mypy missed the other 😅

Let's get mypy in the tasks container, then.

@allisonkarlitskaya
Copy link
Member Author

Let's get mypy in the tasks container, then.

cockpit-project/cockpituous#595

@allisonkarlitskaya
Copy link
Member Author

FAIL: test/static-code
======================

not ok 7 /static-code/test-mypy
# src/cockpit/peer.py:52: error: Incompatible types in assignment (expression has type "tuple[()]", variable has type "list[Callable[[], None]]")  [assignment]
not ok 9 /static-code/test-ruff
# test/pytest/test_samples.py:18:1: I001 [*] Import block is un-sorted or un-formatted
# Found 1 error.
# [*] 1 fixable with the `--fix` option.
WARNING: skipping /static-code/test-vulture: no vulture
FAIL test/static-code (exit status: 1)

better, but oops: vulture.

@allisonkarlitskaya
Copy link
Member Author

FAIL: test/static-code
======================
not ok 7 /static-code/test-mypy
# src/cockpit/peer.py:52: error: Incompatible types in assignment (expression has type "tuple[()]", variable has type "list[Callable[[], None]]")  [assignment]
not ok 9 /static-code/test-ruff
make[1]: *** [Makefile:8149: check-am] Error 2
make: *** [Makefile:8153: check] Error 2
# test/pytest/test_samples.py:18:1: I001 [*] Import block is un-sorted or un-formatted
# Found 1 error.
# [*] 1 fixable with the `--fix` option.
FAIL test/static-code (exit status: 1)
============================================================================

good!

Lacking a proper requirements.txt file, we're at the mercy of whatever
got randomly uploaded to pypy last night, and we've been seeing a lot of
breaks lately.

We already run our ruff/mypy/etc. stuff as part of our unit tests
workflow, so let's stop running it in venv.  The idea is that we should
pass against the current version of the tasks container (which will
probably shift at some point to being our pinned version of the tasks
container).

While we're at it, drop Python 3.7 (which the world seems to have
collectively decided to stop caring about) and add Python 3.13 (which
has been in Fedora 39 for a while already).  Note: we do *not* drop
Python 3.6 — although it is no longer an officially supported release,
it's used in RHEL 7 and RHEL 8 and Fedora intends to keep packaging it.
Copy link
Member

@martinpitt martinpitt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@allisonkarlitskaya allisonkarlitskaya merged commit dada0dc into cockpit-project:main Mar 11, 2024
30 of 31 checks passed
@allisonkarlitskaya allisonkarlitskaya deleted the dont-lint-in-venv branch March 11, 2024 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-test For doc/workflow changes, or experiments which don't need a full CI run,
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants