Skip to content

Commit e434664

Browse files
committed
extra_args should be None by default
1 parent 3b0e4ce commit e434664

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

awswrangler/glue.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ def create_table(self,
125125
TableInput=table_input)
126126

127127
def add_partitions(self, database, table, partition_paths, file_format,
128-
compression, extra_args):
128+
compression, extra_args=None):
129129
if not partition_paths:
130130
return None
131131
partitions = list()
@@ -208,8 +208,10 @@ def parse_table_name(path):
208208

209209
@staticmethod
210210
def csv_table_definition(table, partition_cols_schema, schema, path,
211-
compression, extra_args):
212-
if not partition_cols_schema:
211+
compression, extra_args=None):
212+
if extra_args is None:
213+
extra_args = {}
214+
if partition_cols_schema is None:
213215
partition_cols_schema = []
214216
compressed = False if compression is None else True
215217
sep = extra_args["sep"] if "sep" in extra_args else ","
@@ -281,7 +283,9 @@ def csv_table_definition(table, partition_cols_schema, schema, path,
281283
}
282284

283285
@staticmethod
284-
def csv_partition_definition(partition, compression, extra_args):
286+
def csv_partition_definition(partition, compression, extra_args=None):
287+
if extra_args is None:
288+
extra_args = {}
285289
compressed = False if compression is None else True
286290
sep = extra_args["sep"] if "sep" in extra_args else ","
287291
serde = extra_args.get("serde")

0 commit comments

Comments
 (0)