Replace deprecated typing types
Since Python 3.9 (this project is in Python 3.9.15), some types defined in `typing` module are deprecated.

This PR replaces deprecated `typing` types.
Replace deprecated typing types: Since Python 3.9 (this project is in Python 3.9.15), some types defined in `typing` module are deprecated.

This PR replaces deprecated `typing` types.