Skip to content

ci_setuptools test should not run ruff on setuptools' repo #391

@Avasam

Description

@Avasam

I can understand a type-checking check to see how changing distutils types affect setuptools.

But I don't think it makes sense to check formatting (or single-file linting, which ruff currently is) for an external repo. Which can only lead to failures when updating the tool. Such as

https://github.com/pypa/distutils/actions/runs/20390360987/job/58598680308?pr=390

.tox/py/lib/python3.10/site-packages/pytest_ruff/__init__.py:133: RuffError
----------------------------- Captured stdout call -----------------------------
unformatted: File would be reformatted
   --> setuptools/tests/test_sdist.py:1:1
255 |             assert path not in manifest
256 | 
257 |     _INVALID_PATHS = {
    -         "must be relative": lambda: (
    -             os.path.abspath(os.path.join("sdist_test", "f.h"))
258 +         "must be relative": lambda: os.path.abspath(os.path.join("sdist_test", "f.h")),
259 +         "can't have `..` segments": lambda: os.path.join(
260 +             "sdist_test", "..", "sdist_test", "f.h"
261 |         ),
    -         "can't have `..` segments": lambda: (
    -             os.path.join("sdist_test", "..", "sdist_test", "f.h")
262 +         "doesn't exist": lambda: os.path.join(
263 +             "sdist_test", "this_file_does_not_exist.h"
264 |         ),
    -         "doesn't exist": lambda: (
    -             os.path.join("sdist_test", "this_file_does_not_exist.h")
    -         ),
    -         "must be inside the project root": lambda: (
    -             symlink_or_skip_test(
    -                 touch(os.path.join("..", "outside_of_project_root.h")),
    -                 "symlink.h",
    -             )
265 +         "must be inside the project root": lambda: symlink_or_skip_test(
266 +             touch(os.path.join("..", "outside_of_project_root.h")),
267 +             "symlink.h",
268 |         ),
269 |     }
270 | 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions