Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove branching imports and always import from typing_extensions #4699

Merged
merged 1 commit into from
May 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 1 addition & 6 deletions lib/streamlit/elements/button.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,9 @@
# limitations under the License.

import io
import sys
from typing import cast, Optional, Union, BinaryIO, TextIO
from textwrap import dedent

if sys.version_info >= (3, 8):
from typing import Final
else:
from typing_extensions import Final
from typing_extensions import Final

import streamlit
from streamlit.errors import StreamlitAPIException
Expand Down
8 changes: 1 addition & 7 deletions lib/streamlit/elements/file_uploader.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,7 @@
from streamlit.type_util import Key, to_key
from typing import cast, overload, List, Optional, Union
from textwrap import dedent

import sys

if sys.version_info >= (3, 8):
from typing import Literal
else:
from typing_extensions import Literal
from typing_extensions import Literal

import streamlit
from streamlit import config
Expand Down