From 0b85ff6d2cf5a0ccba699d42ac0b3061b110d150 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 19:00:34 +0000 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/python-jsonschema/check-jsonschema: 0.36.0 → 0.37.1](https://github.com/python-jsonschema/check-jsonschema/compare/0.36.0...0.37.1) - [github.com/psf/black-pre-commit-mirror: 25.12.0 → 26.3.1](https://github.com/psf/black-pre-commit-mirror/compare/25.12.0...26.3.1) - [github.com/PyCQA/isort: 7.0.0 → 8.0.1](https://github.com/PyCQA/isort/compare/7.0.0...8.0.1) - [github.com/codespell-project/codespell: v2.4.1 → v2.4.2](https://github.com/codespell-project/codespell/compare/v2.4.1...v2.4.2) - [github.com/rhysd/actionlint: v1.7.10 → v1.7.12](https://github.com/rhysd/actionlint/compare/v1.7.10...v1.7.12) Additionally, fix failures. Co-authored-by: Stephen Rosen <1300022+sirosen@users.noreply.github.com> --- .pre-commit-config.yaml | 10 +++++----- changelog.d/check-version-is-new.py | 1 + changelog.d/update-pr-refs.py | 1 + src/globus_sdk/globus_app/client_app.py | 2 +- src/globus_sdk/globus_app/user_app.py | 2 +- .../command_line_login_flow_manager.py | 8 ++------ .../auth/client/confidential_client.py | 2 +- .../services/auth/client/service_client.py | 4 ++-- .../token_storage/legacy/sqlite_adapter.py | 6 ++---- src/globus_sdk/token_storage/sqlite.py | 8 ++------ ...ope_parser_intermediate_representations.py | 20 ++++--------------- .../test_base_add_content_directive.py | 6 ++---- tests/unit/sphinxext/test_utils.py | 12 ++++------- 13 files changed, 28 insertions(+), 54 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c9a2efb6..8123f4589 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -12,7 +12,7 @@ repos: args: - "--fix=lf" - repo: https://github.com/python-jsonschema/check-jsonschema - rev: 0.36.0 + rev: 0.37.1 hooks: - id: check-github-workflows - id: check-readthedocs @@ -22,7 +22,7 @@ repos: - id: pyupgrade args: ["--py39-plus"] - repo: https://github.com/psf/black-pre-commit-mirror - rev: 25.12.0 + rev: 26.3.1 hooks: - id: black name: "Autoformat python files" @@ -41,7 +41,7 @@ repos: - 'flake8-comprehensions==3.16.0' - 'flake8-typing-as-t==1.0.0' - repo: https://github.com/PyCQA/isort - rev: 7.0.0 + rev: 8.0.1 hooks: - id: isort name: "Sort python imports" @@ -54,7 +54,7 @@ repos: hooks: - id: slyp - repo: https://github.com/codespell-project/codespell - rev: v2.4.1 + rev: v2.4.2 hooks: - id: codespell args: ["--ignore-regex", "https://[^\\s]*"] @@ -63,7 +63,7 @@ repos: hooks: - id: alphabetize-codeowners - repo: https://github.com/rhysd/actionlint - rev: v1.7.10 + rev: v1.7.12 hooks: - id: actionlint additional_dependencies: diff --git a/changelog.d/check-version-is-new.py b/changelog.d/check-version-is-new.py index 5e3777ba5..5d0264bed 100755 --- a/changelog.d/check-version-is-new.py +++ b/changelog.d/check-version-is-new.py @@ -2,6 +2,7 @@ """ Check if the version number in the source is already present as a changelog header. """ + import os import re import sys diff --git a/changelog.d/update-pr-refs.py b/changelog.d/update-pr-refs.py index e9dec1a39..bc28a9697 100755 --- a/changelog.d/update-pr-refs.py +++ b/changelog.d/update-pr-refs.py @@ -2,6 +2,7 @@ """ Meant to run in the context of a PR GitHub Actions workflow from the repo root """ + import argparse import glob import json diff --git a/src/globus_sdk/globus_app/client_app.py b/src/globus_sdk/globus_app/client_app.py index f8974beed..4247d7236 100644 --- a/src/globus_sdk/globus_app/client_app.py +++ b/src/globus_sdk/globus_app/client_app.py @@ -51,7 +51,7 @@ class ClientApp(GlobusApp): """ _login_client: ConfidentialAppAuthClient - _authorizer_factory: ClientCredentialsAuthorizerFactory # type:ignore + _authorizer_factory: ClientCredentialsAuthorizerFactory # type: ignore def __init__( self, diff --git a/src/globus_sdk/globus_app/user_app.py b/src/globus_sdk/globus_app/user_app.py index f7bd4731f..3a1c01471 100644 --- a/src/globus_sdk/globus_app/user_app.py +++ b/src/globus_sdk/globus_app/user_app.py @@ -69,7 +69,7 @@ class UserApp(GlobusApp): """ _login_client: NativeAppAuthClient | ConfidentialAppAuthClient - _authorizer_factory: ( # type:ignore + _authorizer_factory: ( # type: ignore AccessTokenAuthorizerFactory | RefreshTokenAuthorizerFactory ) diff --git a/src/globus_sdk/login_flows/command_line_login_flow_manager.py b/src/globus_sdk/login_flows/command_line_login_flow_manager.py index 5fc42564b..9d1a3af87 100644 --- a/src/globus_sdk/login_flows/command_line_login_flow_manager.py +++ b/src/globus_sdk/login_flows/command_line_login_flow_manager.py @@ -119,16 +119,12 @@ def print_authorize_url(self, authorize_url: str) -> None: application accesses. """ login_prompt = "Please authenticate with Globus here:" - print( - textwrap.dedent( - f""" + print(textwrap.dedent(f""" {login_prompt} {"-" * len(login_prompt)} {authorize_url} {"-" * len(login_prompt)} - """ - ) - ) + """)) def prompt_for_code(self) -> str: """ diff --git a/src/globus_sdk/services/auth/client/confidential_client.py b/src/globus_sdk/services/auth/client/confidential_client.py index 7639d44dd..743ad3167 100644 --- a/src/globus_sdk/services/auth/client/confidential_client.py +++ b/src/globus_sdk/services/auth/client/confidential_client.py @@ -355,7 +355,7 @@ def create_child_client( :param privacy_policy: URL of client's privacy policy. :param required_idp: In order to use this client a user must have an identity from this IdP in their identity set. - :param preselect_idp: This pre-selects the given IdP on the Globus Auth login + :param preselect_idp: This preselects the given IdP on the Globus Auth login page if the user is not already authenticated. :param additional_fields: Any additional parameters to be passed through. diff --git a/src/globus_sdk/services/auth/client/service_client.py b/src/globus_sdk/services/auth/client/service_client.py index 7e4e8d77d..1323ad86c 100644 --- a/src/globus_sdk/services/auth/client/service_client.py +++ b/src/globus_sdk/services/auth/client/service_client.py @@ -1131,7 +1131,7 @@ def create_client( :param privacy_policy: URL of client's privacy policy. :param required_idp: In order to use this client a user must have an identity from this IdP in their identity set. - :param preselect_idp: This pre-selects the given IdP on the Globus Auth login + :param preselect_idp: This preselects the given IdP on the Globus Auth login page if the user is not already authenticated. :param additional_fields: Any additional parameters to be passed through. @@ -1229,7 +1229,7 @@ def update_client( :param privacy_policy: URL of client's privacy policy. :param required_idp: In order to use this client a user must have an identity from this IdP in their identity set. - :param preselect_idp: This pre-selects the given IdP on the Globus Auth login + :param preselect_idp: This preselects the given IdP on the Globus Auth login page if the user is not already authenticated. :param additional_fields: Any additional parameters to be passed through. diff --git a/src/globus_sdk/token_storage/legacy/sqlite_adapter.py b/src/globus_sdk/token_storage/legacy/sqlite_adapter.py index 28f08bf6e..f0a53075e 100644 --- a/src/globus_sdk/token_storage/legacy/sqlite_adapter.py +++ b/src/globus_sdk/token_storage/legacy/sqlite_adapter.py @@ -68,8 +68,7 @@ def _init_and_connect( else: conn = sqlite3.connect(self.dbname, **connect_params) if init_tables: - conn.executescript( - """ + conn.executescript(""" CREATE TABLE config_storage ( namespace VARCHAR NOT NULL, config_name VARCHAR NOT NULL, @@ -87,8 +86,7 @@ def _init_and_connect( value VARCHAR NOT NULL, PRIMARY KEY (attribute) ); - """ - ) + """) # mark the version which was used to create the DB # also mark the "database schema version" in case we ever need to handle # graceful upgrades diff --git a/src/globus_sdk/token_storage/sqlite.py b/src/globus_sdk/token_storage/sqlite.py index cbd0fb7b0..d7fae0536 100644 --- a/src/globus_sdk/token_storage/sqlite.py +++ b/src/globus_sdk/token_storage/sqlite.py @@ -55,9 +55,7 @@ def _init_and_connect( conn: sqlite3.Connection = sqlite3.connect( self.filepath, **connect_params ) - conn.executescript( - textwrap.dedent( - """ + conn.executescript(textwrap.dedent(""" CREATE TABLE token_storage ( namespace VARCHAR NOT NULL, resource_server VARCHAR NOT NULL, @@ -69,9 +67,7 @@ def _init_and_connect( value VARCHAR NOT NULL, PRIMARY KEY (attribute) ); - """ - ) - ) + """)) # mark the version which was used to create the DB # also mark the "database schema version" in case we ever need to handle # graceful upgrades diff --git a/tests/unit/scopes/test_scope_parser_intermediate_representations.py b/tests/unit/scopes/test_scope_parser_intermediate_representations.py index 7db32f6eb..b9dcc741c 100644 --- a/tests/unit/scopes/test_scope_parser_intermediate_representations.py +++ b/tests/unit/scopes/test_scope_parser_intermediate_representations.py @@ -4,56 +4,44 @@ def test_graph_str_single_node(): g = ScopeGraph.parse("foo") clean_str = _blank_lines_removed(str(g)) - assert ( - clean_str - == """\ + assert clean_str == """\ digraph scopes { rankdir="LR"; foo }""" - ) def test_graph_str_single_optional_node(): g = ScopeGraph.parse("*foo") clean_str = _blank_lines_removed(str(g)) - assert ( - clean_str - == """\ + assert clean_str == """\ digraph scopes { rankdir="LR"; *foo }""" - ) def test_graph_str_single_dependency(): g = ScopeGraph.parse("foo[bar]") clean_str = _blank_lines_removed(str(g)) - assert ( - clean_str - == """\ + assert clean_str == """\ digraph scopes { rankdir="LR"; foo foo -> bar; }""" - ) def test_graph_str_optional_dependency(): g = ScopeGraph.parse("foo[bar[*baz]]") clean_str = _blank_lines_removed(str(g)) - assert ( - clean_str - == """\ + assert clean_str == """\ digraph scopes { rankdir="LR"; foo foo -> bar; bar -> baz [ label = "optional" ]; }""" - ) def _blank_lines_removed(s: str) -> str: diff --git a/tests/unit/sphinxext/test_base_add_content_directive.py b/tests/unit/sphinxext/test_base_add_content_directive.py index 1ea6c538b..724fa7b8e 100644 --- a/tests/unit/sphinxext/test_base_add_content_directive.py +++ b/tests/unit/sphinxext/test_base_add_content_directive.py @@ -18,11 +18,9 @@ def gen_rst(self): assert etree.get("source") == "TEST" paragraph_element = etree.find("paragraph") assert paragraph_element is not None - assert paragraph_element.text == textwrap.dedent( - """\ + assert paragraph_element.text == textwrap.dedent("""\ a - b""" - ) + b""") def test_addcontent_generating_warning( diff --git a/tests/unit/sphinxext/test_utils.py b/tests/unit/sphinxext/test_utils.py index ef0e2a953..c98fd7f1f 100644 --- a/tests/unit/sphinxext/test_utils.py +++ b/tests/unit/sphinxext/test_utils.py @@ -43,20 +43,16 @@ def test_read_sphinx_params(sphinxext): assert len(params) == 6 assert params[0] == ":param param1: some doc on one line" assert params[1] == ":param param2: other doc\n spanning multiple lines" - assert params[2] == textwrap.dedent( - """\ + assert params[2] == textwrap.dedent("""\ :param param3: a doc spanning many - lines""" - ) - assert params[3] == textwrap.dedent( - """\ + lines""") + assert params[3] == textwrap.dedent("""\ :param param4: a doc spanning lines - with a break in the middle ^""" - ) + with a break in the middle ^""") assert params[4] == ":param param5: another" assert params[5] == ":param param6: and a final one after some whitespace"