pyre-check icon indicating copy to clipboard operation
pyre-check copied to clipboard

added show to registry

Open esohel30 opened this issue 1 year ago • 1 comments

#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.

esohel30 avatar Jun 26 '24 04:06 esohel30

Hey maxime I am kind of confused about pretty-printing a registry. How do I go about doing it within a test. I understand that I don't have to make it a test and that I just need to demonstrate that it works by showing some logs/stderr output but I am still confused on how to go about doing that.

esohel30 avatar Jun 26 '24 04:06 esohel30

Done in https://github.com/facebook/pyre-check/pull/877

arthaud avatar Jul 18 '24 08:07 arthaud