Skip to content

Auto-format code in tests/support for style compliance - #590

Open
jonasbardino wants to merge 1 commit into
nextfrom
refactor/reformat-tests-support-code-with-make-format
Open

Auto-format code in tests/support for style compliance#590
jonasbardino wants to merge 1 commit into
nextfrom
refactor/reformat-tests-support-code-with-make-format

Conversation

@jonasbardino

@jonasbardino jonasbardino commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Simply applied formatting rules to tests/support/ code with a
make format-python LINT_ENFORCE_DIRS=tests/support
run.

Should be followed by same to tests/test*, mig/lib and all proper files in bin and sbin folders.

`make format-python LINT_ENFORCE_DIRS=tests/support`
run.
@jonasbardino jonasbardino changed the title Make tests/support style compliant Auto-format code in tests/support for style compliance Jul 10, 2026
@jonasbardino jonasbardino self-assigned this Jul 10, 2026
@jonasbardino jonasbardino added the refactor Non-functional changes to simplify or clean up label Jul 10, 2026
@jonasbardino
jonasbardino marked this pull request as ready for review July 10, 2026 12:53
@jonasbardino
jonasbardino requested a review from a team July 10, 2026 12:55
Comment thread tests/support/__init__.py
from tests.support.fixturesupp import _PreparedFixture
from tests.support.suppconst import MIG_BASE, TEST_BASE, \
TEST_DATA_DIR, TEST_OUTPUT_DIR, ENVHELP_OUTPUT_DIR
from tests.support.suppconst import (

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Didn't we agree on vertical hanging indent imports ?

Comment thread tests/support/__init__.py
# failsafe path checking that supplied paths are rooted within valid paths
is_tmp_path_within_safe_dir = False
for start in (ENVHELP_OUTPUT_DIR):
for start in ENVHELP_OUTPUT_DIR:

@Martin-Rehr Martin-Rehr Jul 28, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This will iterate over every char in ENVHELP_OUTPUT_DIR rather than the dir:

>>> ENVHELP_OUTPUT_DIR = "path1/path2/path3"
>>> for start in ENVHELP_OUTPUT_DIR:
...     print(start)
...
p
a
t
h
1
/
p
a
t
h
2
/
p
a
t
h
3

I'll suggest the change:

-    for start in (ENVHELP_OUTPUT_DIR):
+    for start in (ENVHELP_OUTPUT_DIR,):

Comment thread tests/support/wsgisupp.py

def close(self, *ars, **kwargs):
""""Simply ignore"""
""" "Simply ignore"""

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

"""Simply ignore""" ?

@Martin-Rehr Martin-Rehr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved when comments are addressed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Non-functional changes to simplify or clean up

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants