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

feat: receive custom depth on rich.pretty ✨ #1605

Closed

Conversation

meysam81
Copy link

Type of changes

  • Bug fix
  • New feature
  • Documentation / docstrings
  • Tests
  • Other

Checklist

  • I've run the latest black with default args on new code.
  • I've updated CHANGELOG.md and CONTRIBUTORS.md where appropriate.
  • I've added tests for new code.
  • I accept that @willmcgugan may be pedantic in the code review.

Description

Please describe your changes here. If this fixes a bug, please link to the issue, if possible.

I received a custom arg from input as an integer to the amount of indent a user wishes to have in rich.pretty.

This fixes #1585

@meysam81
Copy link
Author

@willmcgugan
Let me know if you feel happy with the results.
Regards.

@meysam81
Copy link
Author

@willmcgugan
Also, would you add the hacktoberfest to the topics of the repository? Or adding the hacktoberfest-accepted label to the PR?
Thanks.

@willmcgugan
Copy link
Collaborator

I'm afraid I'm not doing Hacktober this year.

This PR doesn't set the depth of the pretty print. It's not the indent size that is needed.

The depth refers to the depth of nesting.

This list has a depth of 1:

[
    "a"
]

This list has a depth of 2:

[
    [
        "b"
    ]
]

@meysam81
Copy link
Author

Aw! I see.
Closing the PR then.
Peace 🤞

@meysam81 meysam81 closed this Oct 17, 2021
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.

[help] How can I apply depth control in rich.pretty?
2 participants