review and fix deprecated typing aliases

Open
#363 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
68/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Quiet
Tech stack
python
Domain
tooling

Research direction

The two examples are ast.py (line 14) and base.py (line 25), and the issue asks for a sweep of the whole codebase. Start by grepping for from typing import to find every deprecated alias such as List, Tuple, Iterator and Sequence. Replace them with built-in generics or collections.abc imports, and leave Optional and Union alone unless the maintainers decide otherwise. Done means no deprecated typing imports remain in the touched files and the existing test suite still passes.

Written by the indexing model from the issue text.

Description

Codebase uses deprecated typing imports.

Ex. 1: ast.py L14: from typing import List, Optional, Union, Tuple
List and Tuple could be replaced with built-ins, and arguably Union could be replaced with | and Optional could be reveiwed.

Ex. 2: base.py L25: from typing import Iterator, Optional, Sequence, TypeVar
Iterator and Sequence should be imported from collections.abc.

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.