Skip to content

Conversation

ericwb
Copy link
Member

@ericwb ericwb commented Jul 10, 2022

The json and yaml formatters were not outputting the lines of
content according to the user's selection.

This is a result of issue:as_dict() function that does not pass
through the max_lines argument to get_code. As a result, it
would always return the default of 3.

This change now optionally passes through desired lines of content.

Fixes #604

Signed-off-by: Eric Brown eric_wade_brown@yahoo.com

The json and yaml formatters were not outputting the lines of
content according to the user's selection.

This is a result of issue:as_dict() function that does not pass
through the max_lines argument to get_code. As a result, it
would always return the default of 3.

This change now optionally passes through desired lines of content.

Fixes PyCQA#604

Signed-off-by: Eric Brown <eric_wade_brown@yahoo.com>
@ericwb ericwb merged commit 6a00317 into PyCQA:main Jul 14, 2022
@ericwb ericwb deleted the num_lines branch July 14, 2022 18:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When using -n and -f (json) flags, -n flag is ignored
1 participant