From bfeadb34d726f82a2d52bfc8a7eb063127534b0a Mon Sep 17 00:00:00 2001 From: pkdash Date: Wed, 18 Sep 2024 10:28:32 -0400 Subject: [PATCH] [#49] code comments cleanup --- hsmodels/schemas/rdf/validators.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/hsmodels/schemas/rdf/validators.py b/hsmodels/schemas/rdf/validators.py index 0835110..30a0797 100644 --- a/hsmodels/schemas/rdf/validators.py +++ b/hsmodels/schemas/rdf/validators.py @@ -99,18 +99,15 @@ def sort_columns(table): # check that column number is in the range of 1 to the length of columns if any(c < 1 or c > len(table["columns"]) for c in column_numbers): raise ValueError("column_number values must be between 1 and the number of columns") - # check no duplicate column numbers if len(column_numbers) != len(set(column_numbers)): raise ValueError("column_number values must be unique") table['columns'] = sorted(table['columns'], key=lambda _column: _column['column_number']) else: # assign column_order to columns that don't have it column_numbers = [c.column_number for c in table.columns] - print(column_numbers, flush=True) # check that column number is in the range of 1 to the length of columns if any(c < 1 or c > len(table.columns) for c in column_numbers): raise ValueError("column_number values must be between 1 and the number of columns") - # check no duplicate column numbers if len(column_numbers) != len(set(column_numbers)): raise ValueError("column_number values must be unique") table.columns = sorted(table.columns, key=lambda _column: _column.column_number)