Skip to content

Lint tests - #125

Merged
bact merged 6 commits into
mainfrom
lint-tests
Aug 4, 2026
Merged

Lint tests#125
bact merged 6 commits into
mainfrom
lint-tests

Conversation

@JPEWdev

@JPEWdev JPEWdev commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Adds lint tests to the test suite so that I stop forgetting to run them

@JPEWdev
JPEWdev requested a review from bact July 2, 2026 21:18
@bact bact added the tests Tests, test spec, test data label Jul 2, 2026
@bact

bact commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

The test failed because there is no black installed.

We could put it in the dev group in [project.optional-dependencies] in project.toml

@github-actions

github-actions Bot commented Jul 4, 2026

Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

@bact

bact commented Jul 4, 2026

Copy link
Copy Markdown
Collaborator

Black now passed on Python 3.10-3.14 but failed on 3.8 and 3.9.

The root cause is multiline_string_handling style that was in "preview" stage (disabled by default; can't be enabled alone, has to enable the whole unstable style) before got upgrade to "stable" (can't be disabled) in 2026.1.0 release.

See Black's PR: https://github.com/psf/black/pull/4892/changes#diff-d975bf659606195d2165918f93e1cf680ef68ea3c9cab994f033705fea8238b2R18 and issue psf/black#256

The easiest fix is to drop Python 3.8 and 3.9 from test, and use Black >= 26.1.0.

Or we can try to reformat the code to make it stable across all Black versions.

@bact bact left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should we drop Python 3.8 and 3.9 from tests?

@bact

bact commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Should we drop Python 3.8 and 3.9 from tests?

Python 3.8 dropped by #115. Python 3.9 still fails.

Add black and flake8 linting to test suite.

Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
bact added 4 commits August 4, 2026 12:16
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
@bact

bact commented Aug 4, 2026

Copy link
Copy Markdown
Collaborator

Test now pass but skipping black test on Python 3.9, see the added pytest.skip line here:

def test_black():
    if sys.version_info < (3, 10):
        pytest.skip("Black 26+ requires Python 3.10+")
    subprocess.run(["black", "--check", "."], cwd=TOP_DIR, check=True)

@bact
bact merged commit d737dae into main Aug 4, 2026
17 checks passed
@bact
bact deleted the lint-tests branch August 4, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

tests Tests, test spec, test data

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants