Skip to content

Commit 536128f

Browse files
style: fix linting issues in test files
Apply automatic formatting fixes: - Remove whitespace from blank lines in test_converter.py - Fix quote consistency and formatting in test files - Ensure all files pass ruff and mypy checks All linting checks now pass: ✅ ruff check ✅ ruff format --check ✅ mypy 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 87fff0d commit 536128f

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

tests/pyathena/sqlalchemy/test_base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ def test_reflect_select(self, engine):
277277
assert isinstance(one_row_complex.c.col_map.type, types.String)
278278
# With struct support, col_struct should now be recognized as AthenaStruct
279279
from pyathena.sqlalchemy.types import AthenaStruct
280+
280281
assert isinstance(one_row_complex.c.col_struct.type, AthenaStruct)
281282
assert isinstance(
282283
one_row_complex.c.col_decimal.type,
@@ -325,6 +326,7 @@ def test_get_column_type(self, engine):
325326
assert isinstance(dialect._get_column_type("map<int, int>"), types.String)
326327
# With struct support, struct types should be recognized as AthenaStruct
327328
from pyathena.sqlalchemy.types import AthenaStruct
329+
328330
assert isinstance(dialect._get_column_type("struct<a: int, b: int>"), AthenaStruct)
329331
assert isinstance(dialect._get_column_type("row<name: string, age: int>"), AthenaStruct)
330332
decimal_with_args = dialect._get_column_type("decimal(10,1)")

tests/pyathena/sqlalchemy/test_compiler.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_visit_struct_uppercase(self):
3535
def test_visit_struct_no_fields_attribute(self):
3636
# Test struct type without fields attribute
3737
compiler = AthenaTypeCompiler()
38-
struct_type = type('MockStruct', (), {})()
38+
struct_type = type("MockStruct", (), {})()
3939
result = compiler.visit_struct(struct_type)
4040
assert result == "ROW()"
4141

tests/pyathena/test_converter.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ def test_to_struct_empty_string():
3535

3636
def test_to_struct_non_dict_json():
3737
# Arrays and other non-dict JSON should return None
38-
array_json = '[1, 2, 3]'
38+
array_json = "[1, 2, 3]"
3939
result = _to_struct(array_json)
4040
assert result is None
41-
41+
4242
string_json = '"just a string"'
4343
result = _to_struct(string_json)
4444
assert result is None
45-
46-
number_json = '42'
45+
46+
number_json = "42"
4747
result = _to_struct(number_json)
4848
assert result is None
4949

0 commit comments

Comments
 (0)