Skip to content

Commit 6099c96

Browse files
committed
Add comment regarding dedent_block_string_value
1 parent a2da74c commit 6099c96

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/graphql/language/block_string.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ def dedent_block_string_value(raw_string: str) -> str:
1313
1414
This implements the GraphQL spec's BlockStringValue() static algorithm.
1515
16+
Note that this is very similar to Python's inspect.cleandoc() function.
17+
The differences is that the latter also expands tabs to spaces and
18+
removes whitespace at the beginning of the first line. Python also has
19+
textwrap.dedent() which uses a completely different algorithm.
20+
1621
For internal use only.
1722
"""
1823
# Expand a block string's raw value into independent lines.

0 commit comments

Comments
 (0)