Skip to content

Commit

Permalink
#818 - more tests and changes to further expand nested scenarios
Browse files Browse the repository at this point in the history
  • Loading branch information
jackdewinter committed Sep 4, 2024
1 parent 4fc1ea1 commit 9af333c
Show file tree
Hide file tree
Showing 40 changed files with 5,555 additions and 765 deletions.
33 changes: 32 additions & 1 deletion newdocs/src/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,38 @@
<!--- pyml disable-next-line no-duplicate-heading-->
### Fixed

- None
- [Issue 1141](https://github.com/jackdewinter/pymarkdown/issues/1141)
- fixed assert issue (test_extra_044mcv0)
- [Issue 1142](https://github.com/jackdewinter/pymarkdown/issues/1142)
- fixed assert issue (test_extra_044lc)
- [Issue 1143](https://github.com/jackdewinter/pymarkdown/issues/1143)
- fixed indent issue (test_extra_044ldb0)
- [Issue 1144](https://github.com/jackdewinter/pymarkdown/issues/1144)
- fixed parsing issue (test_extra_044ldb1)
- [Issue 1145](https://github.com/jackdewinter/pymarkdown/issues/1145)
- fixed indent issue (test_extra_044mx60)
- [Issue 1146](https://github.com/jackdewinter/pymarkdown/issues/1146)
- fixed indent issue (test_extra_044lex1)
- [Issue 1147](https://github.com/jackdewinter/pymarkdown/issues/1147)
- fixed indent issue (test_extra_044mcx)
- [Issue 1148](https://github.com/jackdewinter/pymarkdown/issues/1148)
- fixed parsing issue (test_extra_044ldb1)
- [Issue 1149](https://github.com/jackdewinter/pymarkdown/issues/1149)
- fixed parsing issue (test_extra_044mcz0)
- [Issue 1150](https://github.com/jackdewinter/pymarkdown/issues/1150)
- fixed indent issue (test_extra_044lex3)
- [Issue 1151](https://github.com/jackdewinter/pymarkdown/issues/1151)
- fixed assert issue with untested path (test_extra_044ldg)
- [Issue 1152](https://github.com/jackdewinter/pymarkdown/issues/1152)
- fixed indent issue (test_extra_044mcs0)
- [Issue 1153](https://github.com/jackdewinter/pymarkdown/issues/1153)
- fixed indent issue (test_extra_044mcu0)
- [Issue 1154](https://github.com/jackdewinter/pymarkdown/issues/1154)
- fixed indent issue (test_extra_044mx31)
- [Issue 1155](https://github.com/jackdewinter/pymarkdown/issues/1155)
- fixed indent issue (test_extra_044lde)
- [Issue 1156](https://github.com/jackdewinter/pymarkdown/issues/1156)
- fixed indent issue (test_extra_044ldb0)

<!--- pyml disable-next-line no-duplicate-heading-->
### Changed
Expand Down
8 changes: 4 additions & 4 deletions publish/coverage.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"projectName": "pymarkdown",
"reportSource": "pytest",
"branchLevel": {
"totalMeasured": 5129,
"totalCovered": 5128
"totalMeasured": 5275,
"totalCovered": 5270
},
"lineLevel": {
"totalMeasured": 20228,
"totalCovered": 20226
"totalMeasured": 20668,
"totalCovered": 20658
}
}

20 changes: 11 additions & 9 deletions publish/pylint_suppression.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"pymarkdown/block_quotes/block_quote_data.py": {},
"pymarkdown/block_quotes/block_quote_non_fenced_helper.py": {
"too-few-public-methods": 1,
"too-many-arguments": 7,
"too-many-locals": 3
"too-many-arguments": 5,
"too-many-locals": 1
},
"pymarkdown/block_quotes/block_quote_processor.py": {
"too-many-arguments": 7,
Expand All @@ -32,7 +32,7 @@
},
"pymarkdown/container_blocks/container_block_leaf_processor.py": {
"too-few-public-methods": 1,
"too-many-arguments": 9,
"too-many-arguments": 10,
"chained-comparison": 2,
"too-many-boolean-expressions": 1,
"too-many-locals": 2
Expand All @@ -54,7 +54,8 @@
},
"pymarkdown/container_blocks/container_helper.py": {
"too-few-public-methods": 1,
"too-many-arguments": 2
"too-many-arguments": 2,
"too-many-locals": 1
},
"pymarkdown/container_blocks/container_indices.py": {},
"pymarkdown/container_blocks/parse_block_pass_properties.py": {},
Expand Down Expand Up @@ -360,6 +361,7 @@
"protected-access": 1
},
"pymarkdown/tokens/block_quote_markdown_token.py": {
"too-many-instance-attributes": 1,
"protected-access": 1
},
"pymarkdown/tokens/container_markdown_token.py": {
Expand Down Expand Up @@ -482,8 +484,8 @@
"pymarkdown/transform_markdown/transform_block_quote.py": {},
"pymarkdown/transform_markdown/transform_containers.py": {
"too-few-public-methods": 1,
"too-many-arguments": 10,
"too-many-locals": 1,
"too-many-arguments": 18,
"too-many-locals": 3,
"too-many-boolean-expressions": 2
},
"pymarkdown/transform_markdown/transform_list_block.py": {
Expand All @@ -500,11 +502,11 @@
"pymarkdown/version.py": {}
},
"disables-by-name": {
"too-many-instance-attributes": 25,
"too-many-instance-attributes": 26,
"too-many-public-methods": 4,
"too-few-public-methods": 39,
"too-many-arguments": 245,
"too-many-locals": 48,
"too-many-arguments": 252,
"too-many-locals": 49,
"chained-comparison": 2,
"too-many-boolean-expressions": 3,
"protected-access": 25,
Expand Down
10 changes: 5 additions & 5 deletions publish/test-results.json
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@
"totalTests": 56,
"failedTests": 0,
"errorTests": 0,
"skippedTests": 6,
"skippedTests": 0,
"elapsedTimeInMilliseconds": 0
},
{
Expand Down Expand Up @@ -1172,7 +1172,7 @@
},
{
"name": "test.rules.test_md007",
"totalTests": 82,
"totalTests": 83,
"failedTests": 0,
"errorTests": 0,
"skippedTests": 0,
Expand Down Expand Up @@ -1364,7 +1364,7 @@
},
{
"name": "test.rules.test_md031",
"totalTests": 269,
"totalTests": 268,
"failedTests": 0,
"errorTests": 0,
"skippedTests": 0,
Expand Down Expand Up @@ -1620,10 +1620,10 @@
},
{
"name": "test.test_markdown_extra",
"totalTests": 250,
"totalTests": 309,
"failedTests": 0,
"errorTests": 0,
"skippedTests": 12,
"skippedTests": 16,
"elapsedTimeInMilliseconds": 0
},
{
Expand Down
10 changes: 3 additions & 7 deletions pymarkdown/block_quotes/block_quote_count_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,6 @@ def ensure_stack_at_level(
) -> Tuple[
List[MarkdownToken],
Optional[RequeueLineInfo],
Optional[int],
bool,
BlockQuoteData,
]:
Expand Down Expand Up @@ -719,12 +718,11 @@ def ensure_stack_at_level(
requeue_reset=True,
)
if requeue_line_info:
return [], requeue_line_info, None, False, block_quote_data
return [], requeue_line_info, False, block_quote_data

POGGER.debug("esal>>__calculate_stack_hard_limit(delta)")
(
stack_hard_limit,
extra_consumed_whitespace,
force_list_continuation,
) = BlockQuoteCountHelper.__calculate_stack_hard_limit(
parser_state,
Expand Down Expand Up @@ -760,7 +758,6 @@ def ensure_stack_at_level(
POGGER.debug("esal>>__calculate_stack_hard_limit(no delta)")
(
stack_hard_limit,
extra_consumed_whitespace,
force_list_continuation,
) = BlockQuoteCountHelper.__calculate_stack_hard_limit(
parser_state, position_marker, True, False, False, block_quote_data
Expand All @@ -770,7 +767,6 @@ def ensure_stack_at_level(
return (
container_level_tokens,
None,
extra_consumed_whitespace,
force_list_continuation,
block_quote_data,
)
Expand All @@ -786,7 +782,7 @@ def __calculate_stack_hard_limit(
stack_increase_needed: bool,
stack_decrease_needed: bool,
block_quote_data: BlockQuoteData,
) -> Tuple[Optional[int], Optional[int], bool]:
) -> Tuple[Optional[int], bool]:
POGGER.debug(">>__calculate_stack_hard_limit>>")
POGGER.debug("original_line_to_parse>>:$:", parser_state.original_line_to_parse)
POGGER.debug(
Expand Down Expand Up @@ -873,7 +869,7 @@ def __calculate_stack_hard_limit(
extra_consumed_whitespace,
)
POGGER.debug("force_list_continuation=$", force_list_continuation)
return stack_hard_limit, extra_consumed_whitespace, force_list_continuation
return stack_hard_limit, force_list_continuation

# pylint: enable=too-many-arguments

Expand Down
Loading

0 comments on commit 9af333c

Please sign in to comment.