Skip to content

Bump Ruff to v0.15.18 and address new lint violations#826

Open
julianz- wants to merge 1 commit into
cherrypy:mainfrom
julianz-:bump-ruff-v0.15.18
Open

Bump Ruff to v0.15.18 and address new lint violations#826
julianz- wants to merge 1 commit into
cherrypy:mainfrom
julianz-:bump-ruff-v0.15.18

Conversation

@julianz-

Copy link
Copy Markdown
Member

Updates Ruff from v0.13.3 to v0.15.18
This requires the following changes:

  • Fix D421: reword property docstrings to noun phrases
  • Fix ISC004: parenthesize implicit string concatenation in collections; use single strings with # noqa: LN001 where readability is better
  • Drop now-redundant # noqa: D401 comments on property definitions
  • Suppress PLW0717, RUF067, S607 pending future fixes

What kind of change does this PR introduce?

  • 🐞 bug fix
  • 🐣 feature
  • 📋 docs update
  • 📋 tests/coverage improvement
  • 📋 refactoring
  • 💥 other

📋 What is the related issue number (starting with #)

Resolves #

What is the current behavior? (You can also link to an open issue here)

What is the new behavior (if this is a feature change)?

📋 Other information:

📋 Contribution checklist:

(If you're a first-timer, check out
[this guide on making great pull requests][making a lovely PR])

  • I wrote descriptive pull request text above
  • I think the code is well written
  • I wrote [good commit messages]
  • I have [squashed related commits together][related squash] after
    the changes have been approved
  • Unit tests for the changes exist
  • Integration tests for the changes exist (if applicable)
  • I used the same coding conventions as the rest of the project
  • The new code doesn't generate linter offenses
  • Documentation reflects the changes
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences

@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided A mark meaning that a new change log entry is present within the patch. label Jun 20, 2026
@read-the-docs-community

read-the-docs-community Bot commented Jun 20, 2026

Copy link
Copy Markdown

Documentation build overview

📚 cheroot | 🛠️ Build #33231470 | 📁 Comparing 2bfeca8 against latest (18f4ba8)

  🔍 Preview build  

5 files changed · ± 5 modified

± Modified

- Fix D421: reword property docstrings to noun phrases
- Fix ISC004: parenthesize implicit string concatenation in collections;
  use single strings with # noqa: LN001 where readability is better
- Drop now-redundant # noqa: D401 comments on property definitions
- Suppress PLW0717, RUF067, S607 pending future fixes
@julianz- julianz- force-pushed the bump-ruff-v0.15.18 branch from 794639b to 2bfeca8 Compare June 20, 2026 21:26
@codecov

codecov Bot commented Jun 20, 2026

Copy link
Copy Markdown

❌ 2 Tests Failed:

Tests completed Failed Passed Skipped
244 2 242 12
View the full list of 2 ❄️ flaky test(s)
cheroot/test/test_ssl.py::test_https_over_http_error[0.0.0.0]

Flake rate in main: 20.00% (Passed 4 times, Failed 1 times)

Stack Traces | 0.116s run time
http_server = <generator object http_server.<locals>.start_srv at 0x111fda6d0>
ip_addr = '0.0.0.0'

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        #x1B[33m'#x1B[39;49;00m#x1B[33mip_addr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        (#x1B[90m#x1B[39;49;00m
            ANY_INTERFACE_IPV4,#x1B[90m#x1B[39;49;00m
            ANY_INTERFACE_IPV6,#x1B[90m#x1B[39;49;00m
        ),#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_https_over_http_error#x1B[39;49;00m(http_server, ip_addr):#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Ensure that connecting over HTTPS to HTTP port is handled."""#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        httpserver = http_server.send((ip_addr, EPHEMERAL_PORT))#x1B[90m#x1B[39;49;00m
        interface, _host, port = _get_conn_data(httpserver.bind_addr)#x1B[90m#x1B[39;49;00m
        #x1B[94mwith#x1B[39;49;00m pytest.raises(ssl.SSLError) #x1B[94mas#x1B[39;49;00m ssl_err:#x1B[90m#x1B[39;49;00m
            http.client.HTTPSConnection(#x1B[90m#x1B[39;49;00m
                #x1B[33mf#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33m{#x1B[39;49;00minterface#x1B[33m}#x1B[39;49;00m#x1B[33m:#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mport#x1B[33m}#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ).request(#x1B[33m'#x1B[39;49;00m#x1B[33mGET#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m, #x1B[33m'#x1B[39;49;00m#x1B[33m/#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        expected_substring = (#x1B[90m#x1B[39;49;00m
            #x1B[33m'#x1B[39;49;00m#x1B[33mrecord layer failure#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            #x1B[94mif#x1B[39;49;00m IS_ABOVE_OPENSSL31#x1B[90m#x1B[39;49;00m
            #x1B[94melse#x1B[39;49;00m #x1B[33m'#x1B[39;49;00m#x1B[33mwrong version number#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            #x1B[94mif#x1B[39;49;00m IS_ABOVE_OPENSSL10#x1B[90m#x1B[39;49;00m
            #x1B[94melse#x1B[39;49;00m #x1B[33m'#x1B[39;49;00m#x1B[33munknown protocol#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m
>       #x1B[94massert#x1B[39;49;00m expected_substring #x1B[95min#x1B[39;49;00m ssl_err.value.args[-#x1B[94m1#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE       AssertionError: assert 'record layer failure' in '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)'#x1B[0m

_host      = '0.0.0.0'
expected_substring = 'record layer failure'
http_server = <generator object http_server.<locals>.start_srv at 0x111fda6d0>
httpserver = <cheroot.server.HTTPServer object at 0x111c90a00>
interface  = '127.0.0.1'
ip_addr    = '0.0.0.0'
port       = 49630
ssl_err    = <ExceptionInfo SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)') tblen=10>

#x1B[1m#x1B[31mcheroot/test/test_ssl.py#x1B[0m:733: AssertionError
cheroot/test/test_ssl.py::test_https_over_http_error[::]

Flake rate in main: 12.10% (Passed 414 times, Failed 57 times)

Stack Traces | 0.184s run time
http_server = <generator object http_server.<locals>.start_srv at 0x111cad6d0>
ip_addr = '::'

    #x1B[0m#x1B[37m@pytest#x1B[39;49;00m.mark.parametrize(#x1B[90m#x1B[39;49;00m
        #x1B[33m'#x1B[39;49;00m#x1B[33mip_addr#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
        (#x1B[90m#x1B[39;49;00m
            ANY_INTERFACE_IPV4,#x1B[90m#x1B[39;49;00m
            ANY_INTERFACE_IPV6,#x1B[90m#x1B[39;49;00m
        ),#x1B[90m#x1B[39;49;00m
    )#x1B[90m#x1B[39;49;00m
    #x1B[94mdef#x1B[39;49;00m#x1B[90m #x1B[39;49;00m#x1B[92mtest_https_over_http_error#x1B[39;49;00m(http_server, ip_addr):#x1B[90m#x1B[39;49;00m
    #x1B[90m    #x1B[39;49;00m#x1B[33m"""Ensure that connecting over HTTPS to HTTP port is handled."""#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        httpserver = http_server.send((ip_addr, EPHEMERAL_PORT))#x1B[90m#x1B[39;49;00m
        interface, _host, port = _get_conn_data(httpserver.bind_addr)#x1B[90m#x1B[39;49;00m
        #x1B[94mwith#x1B[39;49;00m pytest.raises(ssl.SSLError) #x1B[94mas#x1B[39;49;00m ssl_err:#x1B[90m#x1B[39;49;00m
            http.client.HTTPSConnection(#x1B[90m#x1B[39;49;00m
                #x1B[33mf#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[33m{#x1B[39;49;00minterface#x1B[33m}#x1B[39;49;00m#x1B[33m:#x1B[39;49;00m#x1B[33m{#x1B[39;49;00mport#x1B[33m}#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m,#x1B[90m#x1B[39;49;00m
            ).request(#x1B[33m'#x1B[39;49;00m#x1B[33mGET#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m, #x1B[33m'#x1B[39;49;00m#x1B[33m/#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m)#x1B[90m#x1B[39;49;00m
        expected_substring = (#x1B[90m#x1B[39;49;00m
            #x1B[33m'#x1B[39;49;00m#x1B[33mrecord layer failure#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            #x1B[94mif#x1B[39;49;00m IS_ABOVE_OPENSSL31#x1B[90m#x1B[39;49;00m
            #x1B[94melse#x1B[39;49;00m #x1B[33m'#x1B[39;49;00m#x1B[33mwrong version number#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
            #x1B[94mif#x1B[39;49;00m IS_ABOVE_OPENSSL10#x1B[90m#x1B[39;49;00m
            #x1B[94melse#x1B[39;49;00m #x1B[33m'#x1B[39;49;00m#x1B[33munknown protocol#x1B[39;49;00m#x1B[33m'#x1B[39;49;00m#x1B[90m#x1B[39;49;00m
        )#x1B[90m#x1B[39;49;00m
>       #x1B[94massert#x1B[39;49;00m expected_substring #x1B[95min#x1B[39;49;00m ssl_err.value.args[-#x1B[94m1#x1B[39;49;00m]#x1B[90m#x1B[39;49;00m
#x1B[1m#x1B[31mE       AssertionError: assert 'record layer failure' in '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)'#x1B[0m

_host      = '::'
expected_substring = 'record layer failure'
http_server = <generator object http_server.<locals>.start_srv at 0x111cad6d0>
httpserver = <cheroot.server.HTTPServer object at 0x111e9b340>
interface  = '::1'
ip_addr    = '::'
port       = 49640
ssl_err    = <ExceptionInfo SSLError(1, '[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)') tblen=10>

#x1B[1m#x1B[31mcheroot/test/test_ssl.py#x1B[0m:733: AssertionError

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@julianz- julianz- requested a review from webknjaz June 21, 2026 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided A mark meaning that a new change log entry is present within the patch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant