Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Palazzo committed Sep 12, 2024
1 parent 6ed0260 commit 7f66113
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions sdv/metadata/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ def load_from_json(cls, filepath, single_table_name=None):
if metadata.get('METADATA_SPEC_VERSION') == 'SINGLE_TABLE_V1':
single_table_name = single_table_name or cls.DEFAULT_SINGLE_TABLE_NAME
warnings.warn(
'You are loading an older SingleTableMetadata object. This will be converted '
f"into the new Metadata object with a placeholder table name ('{single_table_name}')."
'You are loading an older SingleTableMetadata object. This will be converted into'
f" the new Metadata object with a placeholder table name ('{single_table_name}')."
' Please save this new object for future usage.'
)

Expand Down
6 changes: 4 additions & 2 deletions tests/unit/metadata/test_metadata.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import re
from unittest.mock import call, Mock, patch
from unittest.mock import Mock, call, patch

import pandas as pd
import pytest
Expand Down Expand Up @@ -122,7 +122,9 @@ def test_load_from_json_single_table(self, mock_read_json):
)

expected_warning_with_table_name = re.escape(warning_message.format('filepath'))
expected_warning_without_table_name = re.escape(warning_message.format('default_table_name'))
expected_warning_without_table_name = re.escape(
warning_message.format('default_table_name')
)

# Run
with pytest.warns(UserWarning, match=expected_warning_with_table_name):
Expand Down

0 comments on commit 7f66113

Please sign in to comment.