Add Raises: sections to docstrings

Open Beginner friendly
#366 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
63/100
Issue type
Documentation
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
documentation

Research direction

Start with visitor.py and pulse/visitor.py, and use pulse/visitor.py:_check_identifier as the first example, since it exists to raise errors. For each function that raises, add a Raises: section to its docstring that names the exception type and the condition, following the docstring style already used in the file. Done means every function in the two files that can raise has this section; the issue doesn't list every function, so search for raise statements to find them.

Written by the indexing model from the issue text.

Description

Currently, various docstrings (for example, many functions in visitor.py and pulse/visitor.py do not contain a Raises: section in their docstring to inform the user of what errors they may raise and why.

Since some function like pulse/visitor.py:_check_identifier exist solely to raise errors, it would be useful to include this information.

Dominant language
Python
Stars
29
Forks
33
Avg merge
1d 20h
Merged PRs (30d)
8

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from qBraid/pyqasm

All issues in qBraid/pyqasm

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.