Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix json and yaml formatters to respect num lines #929

Merged
merged 1 commit into from Jul 14, 2022

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