We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 342a542 commit b7afedfCopy full SHA for b7afedf
nbqa/handle_magics.py
@@ -74,7 +74,7 @@ class MagicHandler(ABC):
74
# we would run in to formatting issues like single quotes formatted
75
# to double quotes or vice versa. `{token}` is used as hexadecimal number.
76
_MAGIC_TEMPLATE: str = "type({token}) # {magic:10.10} {token}"
77
- _MAGIC_REGEX_TEMPLATE: str = r"type\({token}\).*{token}"
+ _MAGIC_REGEX_TEMPLATE: str = r"type\s*\(\s*{token}\s*\).*{token}"
78
79
def replace_magic(self, ipython_magic: str) -> MagicSubstitution:
80
"""
0 commit comments