ZeroKnight / ZeroBot

My personal IRC/Multi-protocol Bot created (and re-created) for education and amusement.
MIT License
1 stars 0 forks source link

Use `annotations` future to reduce `typing` imports #31

Closed ZeroKnight closed 3 years ago

ZeroKnight commented 3 years ago

Despite the ability to use builtin types as parametric types only being officially available in Python 3.9, we can still use the feature without moving from 3.8 with the annotations future:

from __future__ import annotations

This should cut down the names imported from typing by a fair deal, and since we're cutting these imports now, it's less work to do in the future when ZeroBot moves beyond 3.8.