Skip to content

Commit

Permalink
v2.1.3
Browse files Browse the repository at this point in the history
--------
2023-07-21:
    - require minimum python 3.8
    - remove python 3.7 tests
    - introduce PEP517 packaging standard
    - introduce pyproject.toml build-system
    - remove mypy.ini
    - remove pytest.ini
    - remove setup.cfg
    - remove setup.py
    - remove .bettercodehub.yml
    - remove .travis.yml
    - update black config
    - clean ./tests/test_cli.py
    - add codeql badge
    - move 3rd_party_stubs outside the src directory to ``./.3rd_party_stubs``
    - add pypy 3.10 tests
    - add python 3.12-dev tests
  • Loading branch information
bitranox committed Jul 21, 2023
1 parent 92aa4dc commit 51bf331
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rst_include/libs/lib_assemble_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rst_include/libs/lib_block_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
6 changes: 3 additions & 3 deletions rst_include/libs/lib_include_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 51bf331

Please sign in to comment.