Skip to content

Commit

Permalink
Merge pull request #52 from online-judge-tools/fix
Browse files Browse the repository at this point in the history
minor fix
  • Loading branch information
kmyk authored Sep 15, 2020
2 parents 0e00dad + 0dcacf4 commit 1583780
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 8 deletions.
6 changes: 0 additions & 6 deletions onlinejudge_template/analyzer/minimum_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -527,11 +527,6 @@ def construct_minimum_output_format_tree_using_input_format(*, instances: List[S
except FormatMatchError:
output_samples = [case.output.decode() for case in instances]
return construct_minimum_output_format_tree(instances=output_samples)
print('construct_minimum_output_format_tree_using_input_format')
print(input_variables)
print(minimizer_env)
print(converter_env)
print(converter_used)

# construct the tree
tokenized_instances = [list(tokenize_content(instance.output.decode())) for instance in instances]
Expand All @@ -542,5 +537,4 @@ def construct_minimum_output_format_tree_using_input_format(*, instances: List[S
# make format node
format_node = _convert_to_format_node(node, env=converter_env, used=converter_used)
format_node = node_util.rename_variable_nicely(format_node, used=converter_used)
print(format_node)
return node_util.remove_superfluous_sequence_nodes(format_node)
3 changes: 1 addition & 2 deletions onlinejudge_template/analyzer/simple_patterns.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,8 +353,7 @@ def guess_output_format_with_pattern_matching_using_input_format(*, instances: L
values = {name: input_values[name]} # hide variables other than the `name`
match_format(pattern, data.output.decode(), variables=variables, values=values)
except FormatMatchError as e:
logger.exception(e)
pass
logger.error(e)
else:
logger.debug('simple output pattern found with input variables: %s', pattern)
found.append(pattern)
Expand Down

0 comments on commit 1583780

Please sign in to comment.