diff --git a/rst_include/libs/lib_assemble_block.py b/rst_include/libs/lib_assemble_block.py index bc8a4b1..63aae6c 100644 --- a/rst_include/libs/lib_assemble_block.py +++ b/rst_include/libs/lib_assemble_block.py @@ -156,7 +156,7 @@ def get_block_header(block: Block) -> str: content = '' if block.include_file_code: content_lines = list() - content_lines.append(f'.. code-block:: {block.include_file_code}') + content_lines.append(f'.. code-block:: {block.include_file_code}') # noqa: E231 # for python 3.12beta content_lines = content_lines + [pass_through_option.content for pass_through_option in block.pass_through_options] content = '\n'.join(content_lines) return content diff --git a/rst_include/libs/lib_block_options.py b/rst_include/libs/lib_block_options.py index d05ae79..dff4366 100644 --- a/rst_include/libs/lib_block_options.py +++ b/rst_include/libs/lib_block_options.py @@ -147,7 +147,7 @@ def get_option_key_from_source_line(source_line: SourceLine) -> str: def log_and_raise_value_error_if_option_not_in_block(option: str, block: Block) -> None: if not is_option_in_block(option, block): - s_error = f'Error in File: "{block.source}", option "{option}" not found in block starting with Line: {block.l_source_lines[0].line_number}' + s_error = f'Error in File: "{block.source}", option "{option}" not found in block starting with Line: {block.l_source_lines[0].line_number}' # noqa: E713 # for python 3.12beta lib_log_utils.log_error(s_error) raise ValueError(s_error) diff --git a/rst_include/libs/lib_include_file.py b/rst_include/libs/lib_include_file.py index 1d141e3..f8a0ef8 100644 --- a/rst_include/libs/lib_include_file.py +++ b/rst_include/libs/lib_include_file.py @@ -74,7 +74,7 @@ def read_include_file(block: Block) -> List[str]: except FileNotFoundError: s_error = f'Error in File "{block.source}", Line {block.l_source_lines[0].line_number}: File not found : '\ - '"{block.include_filename_absolut}"' + '"{block.include_filename_absolut}"' # noqa: E126 # for python 3.12beta lib_log_utils.log_traceback.log_exception_traceback(s_error) raise IOError(s_error) @@ -225,7 +225,7 @@ def slice_include_file_markers(block: Block) -> None: def log_and_raise_if_start_after_not_found_in_string(content: str, block: Block) -> None: if block.include_file_start_after not in content: s_error = f'Error in File "{block.source}", Line {block.l_source_lines[0].line_number}: '\ - f'include File "{block.include_filename}" : start-after "{block.include_file_start_after}" not found' + f'include File "{block.include_filename}" : start-after "{block.include_file_start_after}" not found' # noqa: E126 # for python 3.12beta s_error = s_error + get_additional_error_string(block) lib_log_utils.log_error(s_error) raise ValueError(s_error) @@ -234,7 +234,7 @@ def log_and_raise_if_start_after_not_found_in_string(content: str, block: Block) def log_and_raise_if_end_before_not_found_in_string(content: str, block: Block) -> None: if block.include_file_end_before not in content: s_error = f'Error in File "{block.source}", Line {block.l_source_lines[0].line_number}: ' \ - f'include File "{block.include_filename}" : end-before "{block.include_file_end_before}" not found' + f'include File "{block.include_filename}" : end-before "{block.include_file_end_before}" not found' # noqa: E126 # for python 3.12beta s_error = s_error + get_additional_error_string(block) s_error = s_error + get_additional_error_string_start_after(block) lib_log_utils.log_error(s_error)