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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exclude broken typing-extensions version + fix import #2460

Merged
merged 1 commit into from Aug 29, 2021
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
2 changes: 2 additions & 0 deletions CHANGES.md
Expand Up @@ -14,6 +14,8 @@
- Parsing support has been added for unparenthesized walruses in set literals, set
comprehensions, and indices (#2447).
- Pin `setuptools-scm` build-time dependency version (#2457)
- Exclude typing-extensions version 3.10.0.1 due to it being broken on Python 3.10
(#2460)

### _Blackd_

Expand Down
5 changes: 4 additions & 1 deletion setup.py
Expand Up @@ -79,7 +79,10 @@ def get_long_description() -> str:
"regex>=2020.1.8",
"pathspec>=0.9.0, <1",
"dataclasses>=0.6; python_version < '3.7'",
"typing_extensions>=3.10.0.0; python_version < '3.10'",
"typing_extensions>=3.10.0.0",
# 3.10.0.1 is broken on at least Python 3.10,
# https://github.com/python/typing/issues/865
"typing_extensions!=3.10.0.1; python_version >= '3.10'",
"mypy_extensions>=0.4.3",
],
extras_require={
Expand Down
12 changes: 8 additions & 4 deletions src/black/handle_ipynb_magics.py
@@ -1,15 +1,19 @@
"""Functions to process IPython magics with."""

from functools import lru_cache
import dataclasses
import ast
from typing import Dict
from typing import Dict, List, Tuple, Optional

import secrets
from typing import List, Tuple
import sys
import collections

from typing import Optional
from typing_extensions import TypeGuard
if sys.version_info >= (3, 10):
from typing import TypeGuard
else:
from typing_extensions import TypeGuard

from black.report import NothingChanged
from black.output import out

Expand Down