diff --git a/.editorconfig b/.editorconfig index d4a2c440..70b87258 100644 --- a/.editorconfig +++ b/.editorconfig @@ -10,6 +10,9 @@ insert_final_newline = true charset = utf-8 end_of_line = lf +[*.{yaml,yml}] +indent_size = 2 + [*.bat] indent_style = tab end_of_line = crlf diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d076aeb1..fcbcb065 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -9,6 +9,11 @@ repos: - id: debug-statements - id: end-of-file-fixer exclude: '^.+?\.json$' + - repo: https://github.com/PyCQA/flake8 + rev: 7.1.2 + hooks: + - id: flake8 + additional_dependencies: ['flake8-print==5.0.0'] - repo: https://github.com/asottile/reorder_python_imports rev: v1.4.0 hooks: diff --git a/CHANGELOG.md b/CHANGELOG.md index 0adae373..c11b1a21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ List of the most important changes for each release. +## 0.8.9 +- Removes debugging print statements +- Adds flake8 linting + ## 0.8.8 - Adds support for Python 3.14 diff --git a/morango/__init__.py b/morango/__init__.py index aa00ec3d..8d8e3b77 100644 --- a/morango/__init__.py +++ b/morango/__init__.py @@ -1 +1 @@ -__version__ = "0.8.8" +__version__ = "0.8.9" diff --git a/morango/models/core.py b/morango/models/core.py index 73f175f1..fc97250a 100644 --- a/morango/models/core.py +++ b/morango/models/core.py @@ -483,8 +483,6 @@ def _deserialize_store_model(self, fk_cache, defer_fks=False, sync_filter=None): klass_model.syncing_objects.filter(id=self.id).delete() return None, deferred_fks else: - if sync_filter: - print("Has filter", sync_filter) # load model into memory app_model = klass_model.deserialize(json.loads(self.serialized), sync_filter=sync_filter) app_model._morango_source_id = self.source_id diff --git a/morango/sync/operations.py b/morango/sync/operations.py index a5fa0c75..4379c3ed 100644 --- a/morango/sync/operations.py +++ b/morango/sync/operations.py @@ -465,7 +465,6 @@ def _deserialize_from_store(profile, skip_erroring=False, filter=None): lambda x, y: x | y, [Q(partition__startswith=prefix) for prefix in filter], ) - print("prefix_condition: ", prefix_condition) store_models = store_models.filter(prefix_condition) # if requested, skip any records that previously errored, to be faster