Skip to content

Commit 4e9eaf4

Browse files
committed
Use black.Mode instead of .FileMode
1 parent c3a1987 commit 4e9eaf4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

typeagent/aitools/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def format_code(text: str, line_width=None) -> str:
5151
# Use the terminal width, but cap it to 200 characters.
5252
line_width = min(200, shutil.get_terminal_size().columns)
5353
formatted_text = black.format_str(
54-
text, mode=black.FileMode(line_length=line_width)
54+
text, mode=black.Mode(line_length=line_width)
5555
).rstrip()
5656
return reindent(formatted_text)
5757

typeagent/knowpro/answers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def create_context_prompt(context: AnswerContext) -> str:
128128
prompt = [
129129
"[ANSWER CONTEXT]",
130130
"===",
131-
black.format_str(str(dictify(context)), mode=black.FileMode(line_length=200)),
131+
black.format_str(str(dictify(context)), mode=black.Mode(line_length=200)),
132132
"===",
133133
]
134134
return "\n".join(prompt)

0 commit comments

Comments
 (0)