Skip to content

Commit

Permalink
refactor: Rename setting activate_version to `process_activate_vers…
Browse files Browse the repository at this point in the history
…ion_messages`
  • Loading branch information
edgarrmondragon committed Dec 10, 2024
1 parent fd494db commit ca03d9b
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
- id: check-github-workflows

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.1
rev: v0.8.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
- id: check-github-workflows

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.1
rev: v0.8.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ repos:
- id: check-github-workflows

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.1
rev: v0.8.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
2 changes: 1 addition & 1 deletion singer_sdk/helpers/capabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@
).to_dict()
ACTIVATE_VERSION_CONFIG = PropertiesList(

Check warning on line 147 in singer_sdk/helpers/capabilities.py

View workflow job for this annotation

GitHub Actions / Check API Changes

ACTIVATE_VERSION_CONFIG

Attribute value was changed: `PropertiesList(Property('activate_version', BooleanType, default=True, title='Process `ACTIVATE_VERSION` messages', description='Whether to process `ACTIVATE_VERSION` messages.')).to_dict()` -> `PropertiesList(Property('process_activate_version_messages', BooleanType, default=True, title='Process `ACTIVATE_VERSION` messages', description='Whether to process `ACTIVATE_VERSION` messages.')).to_dict()`
Property(
"activate_version",
"process_activate_version_messages",
BooleanType,
default=True,
title="Process `ACTIVATE_VERSION` messages",
Expand Down
2 changes: 1 addition & 1 deletion singer_sdk/sinks/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def process_activate_version_messages(self) -> bool:
Returns:
True if activate version messages should be processed.
"""
return self.config.get("activate_version", True)
return self.config.get("process_activate_version_messages", True)

@property
def datetime_error_treatment(self) -> DatetimeErrorTreatmentEnum:
Expand Down
7 changes: 6 additions & 1 deletion tests/samples/test_target_sqlite.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,12 @@ def sqlite_sample_target_hard_delete(sqlite_target_test_config):
@pytest.fixture
def sqlite_sample_target_no_activate_version(sqlite_target_test_config):
"""Get a sample target object with hard_delete disabled."""
return SQLiteTarget(config={**sqlite_target_test_config, "activate_version": False})
return SQLiteTarget(
config={
**sqlite_target_test_config,
"process_activate_version_messages": False,
}
)


@pytest.fixture
Expand Down

0 comments on commit ca03d9b

Please sign in to comment.