Skip to content

Commit

Permalink
Use python_implementation to detect pypy
Browse files Browse the repository at this point in the history
  • Loading branch information
olliemath authored Oct 27, 2021
1 parent 5885d63 commit fe1d91d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/black/parsing.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Parse Python code and perform AST validation.
"""
import ast
import platform
import sys
from typing import Iterable, Iterator, List, Set, Union, Tuple

Expand All @@ -15,7 +16,7 @@
from black.mode import TargetVersion, Feature, supports_feature
from black.nodes import syms

_IS_PYPY = "__pypy__" in sys.modules
_IS_PYPY = platform.python_implementation() == "PyPy"

try:
from typed_ast import ast3, ast27
Expand Down

0 comments on commit fe1d91d

Please sign in to comment.