Skip to content

Commit

Permalink
Update src/black/__init__.py
Browse files Browse the repository at this point in the history
Co-authored-by: Marco Edward Gorelli <marcogorelli@protonmail.com>
  • Loading branch information
Daniel Sparing and MarcoGorelli committed Nov 29, 2021
1 parent 1d115f2 commit aadf7e2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/black/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -962,9 +962,7 @@ def validate_cell(src: str) -> None:
"""
if any(transformed_magic in src for transformed_magic in TRANSFORMED_MAGICS):
raise NothingChanged
if src[:2] == "%%" and src.split()[0] not in (
"%%" + magic for magic in PYTHON_CELL_MAGICS
):
if src[:2] == "%%" and src.split()[0][2:] not in PYTHON_CELL_MAGICS:
raise NothingChanged


Expand Down

0 comments on commit aadf7e2

Please sign in to comment.