facebook / pyre-check

Performant type-checking for python.
https://pyre-check.org/
MIT License
6.86k stars 437 forks source link

enhanced the registry module to support pretty printing and string co… #877

Closed esohel30 closed 5 months ago

esohel30 commented 5 months ago

869

This pull request adds pp and show functions to the Registry module to enable pretty-printing of the map contents for easier debugging and logging.

Changes:

Added pp Function:

The pp function formats the map's key-value pairs for pretty-printing. Utilizes Format.fprintf for formatting and printing the map contents in a readable format.

Added show Function:

The show function converts the map to a string representation using the pp function.

Uses Format.asprintf to generate the string representation of the map.

Modified File:

registry.ml

The pull request is not fully done. Please provide any feedback on if I have the general understanding of the Issue. I will then implement the feedback and attempt to tackle the entire issue.

facebook-github-bot commented 5 months ago

Hi @esohel30!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

facebook-github-bot commented 5 months ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!