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

Return NothingChanged if non-Python cell magic is detected, to avoid tokenize error #2630

Merged
merged 13 commits into from Nov 29, 2021
Merged

Return NothingChanged if non-Python cell magic is detected, to avoid tokenize error #2630

merged 13 commits into from Nov 29, 2021

Commits on Nov 19, 2021

  1. Include cell magics in validate_cell

    Let `validate_cell()` also catch non-Python cell magics, as the bodies of these might contain invalid indentation (such as `%%writefile`) and this could cause TransformerManager to break.
    Daniel Sparing committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    e97f241 View commit details
    Browse the repository at this point in the history
  2. add test for "badly" indented text file

    this should be a valid arbitrary writefile, but before it failed via the tokenizer.
    Daniel Sparing committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    c0e9ef8 View commit details
    Browse the repository at this point in the history
  3. minor formatting

    Daniel Sparing committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    dbf3e55 View commit details
    Browse the repository at this point in the history
  4. correct and extend docstring

    Daniel Sparing committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    40d3431 View commit details
    Browse the repository at this point in the history
  5. add non-Python note and changelog

    Daniel Sparing committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    80788ef View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    00fb86b View commit details
    Browse the repository at this point in the history
  7. flip validate_cell cell magics for allowlist

    and remove later unnecessary check
    Daniel Sparing committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    8994c9e View commit details
    Browse the repository at this point in the history
  8. replace %t with %timeit in test

    as we are now allowlisting python cell magics and %t would be a user-defined custom one
    Daniel Sparing committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    f12e58d View commit details
    Browse the repository at this point in the history
  9. added further python cell magics

    Daniel Sparing committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    858a7c1 View commit details
    Browse the repository at this point in the history
  10. expand changelog

    Daniel Sparing committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    1e8a0b1 View commit details
    Browse the repository at this point in the history
  11. removing %%python2

    as `Black` does not support Python2 anymore
    Daniel Sparing committed Nov 19, 2021
    Configuration menu
    Copy the full SHA
    7448206 View commit details
    Browse the repository at this point in the history

Commits on Nov 28, 2021

  1. Configuration menu
    Copy the full SHA
    1d115f2 View commit details
    Browse the repository at this point in the history

Commits on Nov 29, 2021

  1. Update src/black/__init__.py

    Co-authored-by: Marco Edward Gorelli <marcogorelli@protonmail.com>
    Daniel Sparing and MarcoGorelli committed Nov 29, 2021
    Configuration menu
    Copy the full SHA
    aadf7e2 View commit details
    Browse the repository at this point in the history