bazingagin/npc_gzip

IndentationError in data.py: expected an indented block after function definition

Closed this issue · 0 comments

This code in data.py produces a syntax error (raised as IndentationError):

npc_gzip/data.py

Lines 315 to 325 in 9e6d51b

def load_filipino():
"""deprecated - datasets on huggingface have overlapped train&test"""
def process(ds):
"""
Loads the Dengue Filipino dataset
Returns:
tuple: Tuple of lists containing the training and testing datasets respectively.
"""
def process(dataset: list) -> list:

It seems to have arisen from a merge in which:

  • The old and new docstrings for load_filipino both came in, but the old one ended up inside the local function instead of merging them into a single docstring.
  • The old and new def process lines both came in, and were both kept instead of the old one being removed.

Currently the IndentationError syntax error refers just to the first of those problems, but if it were fixed without addressing the other, then the second syntax error would arise during parsing.

This bug is conceptually similar to #19 in that it also appears to have arisen as a consequence of an unintentional change in a merge of two branches, neither of which contained the bug. I've proposed a fix for both in #21.