diff --git a/cimgen/cimgen.py b/cimgen/cimgen.py index b52d595d..c3046c99 100644 --- a/cimgen/cimgen.py +++ b/cimgen/cimgen.py @@ -1,6 +1,7 @@ import logging import os import textwrap +import warnings from time import time import xmltodict @@ -311,7 +312,13 @@ def wrap_and_clean(txt: str, width: int = 120, initial_indent="", subsequent_ind """ Used for comments: make them fit within character, including indentation. """ - soup = BeautifulSoup(txt, "html.parser") + + # Ignore MarkupResemblesLocatorWarning + with warnings.catch_warnings(): + warnings.simplefilter("ignore") + + soup = BeautifulSoup(txt, "html.parser") + return "\n".join( textwrap.wrap( soup.text, diff --git a/cimgen/languages/java/lang_pack.py b/cimgen/languages/java/lang_pack.py index df871c73..abba92e2 100644 --- a/cimgen/languages/java/lang_pack.py +++ b/cimgen/languages/java/lang_pack.py @@ -48,7 +48,6 @@ def run_template(outputPath, class_details): if attribute_type(attr) == "primitive": class_details["primitives"].append(attr) if class_details["is_a_float"] == True: - print(class_details["class_name"] + " is a float ") templates = float_template_files elif class_details["has_instances"] == True: templates = enum_template_files