Skip to content

Commit

Permalink
doc: update intro page
Browse files Browse the repository at this point in the history
  • Loading branch information
Ken Kundert authored and Ken Kundert committed Jun 7, 2024
1 parent 13f39f3 commit f0718d6
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 13 deletions.
2 changes: 1 addition & 1 deletion clean
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ rm -rf .eggs .pytest_cache .cache dist .build inform.egg.info
rm -rf **/{__pycache__,*.pyc,*.pyo}
rm -rf tests/{htmlcov,.cache,.coverage,.pytest_cache}
rm -rf doc/.build .hypothesis tests/.hypothesis
rm -rf .tox
rm -rf .tox .mypycache
60 changes: 48 additions & 12 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -255,9 +255,6 @@ constructing messages.

.. list-table::

* - :ref:`aaa desc`
- Pretty prints, then returns, its argument; used when debugging code.

* - :ref:`color desc`
- Used to color messages sent to the console.

Expand All @@ -271,12 +268,20 @@ constructing messages.
* - :ref:`cull desc`
- Strips uninteresting value from collections.

* - :ref:`ddd desc`
- Pretty prints its arguments, used when debugging code.
* - :ref:`dedent desc`
- Dedents a block of text.

* - :ref:`did_you_mean desc`
- Given a word and list of candidates, returns the candidate that is most
similar to the word.

* - :ref:`fmt desc`
- Similar to format(), but can pull arguments from the local scope.

* - :ref:`format_range desc`
- Converts a set of numbers to a succinct, readable string that summarizes
the set.

* - :ref:`full_stop desc`
- Add a period to end of string if it has no other punctuation.

Expand Down Expand Up @@ -304,24 +309,29 @@ constructing messages.
* - :ref:`os_error desc`
- Generates clean messages for operating system errors

* - :ref:`parse_range desc`
- Converts a set of numbers from a succinct, readable string that␣
summarizes the set.

* - :ref:`plural desc`
- Pluralizes a word if needed.

* - :ref:`ppp desc`
- Print function, used when debugging code.

* - :ref:`progressbar desc`
- Used to generate progress bars.

* - :ref:`render desc`
- Converts many of the built-in Python data types into attractive, compact,
and easy to read strings.

* - :ref:`sss desc`
- Prints stack trace, used when debugging code.
* - :ref:`render_bar desc`
- Generates a text bar whose width is controlled by a normalized value.

* - :ref:`vvv desc`
- Print all variables that have given value, used when debugging code.
* - :ref:`title_case desc`
- Converts the initial letters in the words of a string to upper case while
maintaining any letters that are already upper case, such as acronyms.

* - :ref:`truth desc`
- Like plural, but for Booleans.

One of the most used is *os_error*. It converts *OSError* exceptions into
a simple well formatted string that can be used to describe the exception to the
Expand All @@ -337,6 +347,25 @@ user.
... error(os_error(e))
error: config: no such file or directory.
*Inform* provides a collection of debugging functions.

.. list-table::

* - :ref:`aaa desc`
- Pretty prints, then returns, its argument; used when debugging code.

* - :ref:`ddd desc`
- Pretty prints its arguments, used when debugging code.

* - :ref:`ppp desc`
- Print function, used when debugging code.

* - :ref:`sss desc`
- Prints stack trace, used when debugging code.

* - :ref:`vvv desc`
- Print all variables that have given value, used when debugging code.


Generic Exception
"""""""""""""""""
Expand All @@ -363,6 +392,13 @@ used when reporting errors:
... e.report()
error: config: no such file or directory.
The exception accepts both unnamed and named arguments. All are recorded and
available for later use.

*template* may be added to the class as an attribute, in which case it acts as
the default template for the exception (used to format the exception arguments
into an error message).


Documentation
-------------
Expand Down

0 comments on commit f0718d6

Please sign in to comment.