diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1f2781725304..b2f809390f09 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,7 @@ repos: - id: detect-private-key exclude: tests/test_fixtures/database_key_test* - repo: https://github.com/astral-sh/ruff-pre-commit - rev: "v0.4.4" + rev: "v0.4.8" hooks: - id: ruff args: ["--fix"] diff --git a/contrib/cli/requirements.txt b/contrib/cli/requirements.txt index 67f9bdd3a259..0ead4ae56149 100644 --- a/contrib/cli/requirements.txt +++ b/contrib/cli/requirements.txt @@ -3,6 +3,6 @@ cookiecutter==2.1.1 # Project templating mypy==1.10.0 # Type checker pydantic>=1.0 # Needed for mypy plugin pytest>=5.3.5 # Test framework -ruff==0.4.4 # Linting / code style / formatting +ruff==0.4.8 # Linting / code style / formatting twine==3.7.1 # Packaging wheel==0.38.1 # Packaging diff --git a/great_expectations/data_context/util.py b/great_expectations/data_context/util.py index cb3a18c99e74..9941d4ce2006 100644 --- a/great_expectations/data_context/util.py +++ b/great_expectations/data_context/util.py @@ -26,7 +26,7 @@ # TODO: Rename config to constructor_kwargs and config_defaults -> constructor_kwarg_default # TODO: Improve error messages in this method. Since so much of our workflow is config-driven, this will be a *super* important part of DX. # noqa: E501 -def instantiate_class_from_config( # noqa: C901, PLR0912 +def instantiate_class_from_config( # noqa: C901 config, runtime_environment, config_defaults=None ): """Build a GX class from configuration dictionaries.""" diff --git a/great_expectations/expectations/core/expect_column_values_to_be_of_type.py b/great_expectations/expectations/core/expect_column_values_to_be_of_type.py index d9bc228b712d..861f4bfbba3b 100644 --- a/great_expectations/expectations/core/expect_column_values_to_be_of_type.py +++ b/great_expectations/expectations/core/expect_column_values_to_be_of_type.py @@ -605,7 +605,7 @@ def _validate( ) -def _get_dialect_type_module( # noqa: C901, PLR0911, PLR0912 +def _get_dialect_type_module( # noqa: C901, PLR0911 execution_engine, ): if execution_engine.dialect_module is None: diff --git a/great_expectations/expectations/row_conditions.py b/great_expectations/expectations/row_conditions.py index 4dfb9abe2580..765a146e41a0 100644 --- a/great_expectations/expectations/row_conditions.py +++ b/great_expectations/expectations/row_conditions.py @@ -125,7 +125,7 @@ def _parse_great_expectations_condition(row_condition: str): # noinspection PyUnresolvedReferences -def parse_condition_to_spark( # type: ignore[return] # return or raise exists for all branches # noqa: C901, PLR0911, PLR0912 +def parse_condition_to_spark( # type: ignore[return] # return or raise exists for all branches # noqa: C901, PLR0911 row_condition: str, ) -> pyspark.Column: parsed = _parse_great_expectations_condition(row_condition) diff --git a/great_expectations/render/renderer/content_block/content_block.py b/great_expectations/render/renderer/content_block/content_block.py index 93f846320dac..eb899188a0cc 100644 --- a/great_expectations/render/renderer/content_block/content_block.py +++ b/great_expectations/render/renderer/content_block/content_block.py @@ -214,7 +214,7 @@ def _render_list( # noqa: C901, PLR0912, PLR0913 return None @classmethod - def _render_other( # noqa: C901, PLR0912, PLR0913 + def _render_other( # noqa: C901, PLR0913 cls, render_object: Any, exception_list_content_block: bool, diff --git a/great_expectations/render/renderer_configuration.py b/great_expectations/render/renderer_configuration.py index 101c1f474965..c43d48c2205e 100644 --- a/great_expectations/render/renderer_configuration.py +++ b/great_expectations/render/renderer_configuration.py @@ -206,7 +206,7 @@ class Config: allow_mutation = False @root_validator(pre=True) - def _validate_param_type_matches_value( # noqa: C901, PLR0912 + def _validate_param_type_matches_value( # noqa: C901 cls, values: dict ) -> dict: """ diff --git a/reqs/requirements-dev-contrib.txt b/reqs/requirements-dev-contrib.txt index 578d34eb599c..ac3a284c5b72 100644 --- a/reqs/requirements-dev-contrib.txt +++ b/reqs/requirements-dev-contrib.txt @@ -2,5 +2,5 @@ adr-tools-python==1.0.3 invoke>=2.0.0 mypy==1.10 pre-commit>=2.21.0 -ruff==0.4.4 +ruff==0.4.8 tomli>=2.0.1 diff --git a/tasks.py b/tasks.py index e177557e77e2..b6e15fa9bc28 100644 --- a/tasks.py +++ b/tasks.py @@ -494,7 +494,7 @@ def docker( " Can be combined with `--sync` to reset the /schemas dir and remove stale schemas", }, ) -def type_schema( # noqa: C901, PLR0912 - too complex +def type_schema( # noqa: C901 - too complex ctx: Context, sync: bool = False, clean: bool = False, diff --git a/tests/data_context/test_data_context_utils.py b/tests/data_context/test_data_context_utils.py index 3aebb6b520b3..c2d6e593f0fb 100644 --- a/tests/data_context/test_data_context_utils.py +++ b/tests/data_context/test_data_context_utils.py @@ -54,7 +54,7 @@ def test_load_class_raises_error_when_module_name_is_not_string(): @pytest.mark.filterwarnings( "ignore:SQLAlchemy is not installed*:UserWarning:great_expectations.data_context.util" ) -def test_password_masker_mask_db_url( # noqa: PLR0912,PLR0915,C901- 11 +def test_password_masker_mask_db_url( # noqa: PLR0915, C901- 11 monkeypatch, tmp_path ): """ diff --git a/tests/integration/test_script_runner.py b/tests/integration/test_script_runner.py index 33cd909bcaa9..dd4afcaee782 100644 --- a/tests/integration/test_script_runner.py +++ b/tests/integration/test_script_runner.py @@ -422,7 +422,7 @@ def test_integration_tests(test_configuration, tmp_path, pytest_parsed_arguments _execute_integration_test(test_configuration, tmp_path) -def _execute_integration_test( # noqa: C901, PLR0912, PLR0915 +def _execute_integration_test( # noqa: C901, PLR0915 integration_test_fixture: IntegrationTestFixture, tmp_path: pathlib.Path ): """