Skip to content

Commit

Permalink
Merge 97333cf into 140ed21
Browse files Browse the repository at this point in the history
  • Loading branch information
drvinceknight committed Apr 11, 2019
2 parents 140ed21 + 97333cf commit f117f78
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
black>=18.9b0
loguru>=0.2.5
black>=19.3b0
loguru>=0.2.5
11 changes: 4 additions & 7 deletions src/blackbook/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from typing import Iterator, Optional

import re
import pathlib
import json
import pathlib
import re
from typing import Iterator, Optional

import black

Expand All @@ -28,9 +27,7 @@ def format_notebook_content(path: pathlib.Path) -> Optional[dict]:

try: # Some ipynb files will not have valid source code
string = "".join(cell["source"])
formatted_string = black.format_str(
string, line_length=black.DEFAULT_LINE_LENGTH
)
formatted_string = black.format_str(string, mode=black.FileMode())
if formatted_string != string:
modification_found = True
cell["source"] = [
Expand Down

0 comments on commit f117f78

Please sign in to comment.