Skip to content

Commit 77d52ff

Browse files
committed
More adaptations to the new char line length limit
1 parent a96eacd commit 77d52ff

File tree

95 files changed

+862
-915
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

95 files changed

+862
-915
lines changed

graphql/__init__.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -322,15 +322,13 @@
322322
build_schema,
323323
# @deprecated: Get the description from a schema AST node.
324324
get_description,
325-
# Extends an existing GraphQLSchema from a parsed GraphQL Schema
326-
# language AST.
325+
# Extends an existing GraphQLSchema from a parsed GraphQL Schema language AST.
327326
extend_schema,
328327
# Sort a GraphQLSchema.
329328
lexicographic_sort_schema,
330329
# Print a GraphQLSchema to GraphQL Schema language.
331330
print_schema,
332-
# Prints the built-in introspection schema in the Schema Language
333-
# format.
331+
# Prints the built-in introspection schema in the Schema Language format.
334332
print_introspection_schema,
335333
# Print a GraphQLType to GraphQL Schema language.
336334
print_type,
@@ -342,8 +340,8 @@
342340
value_from_ast_untyped,
343341
# Create a GraphQL language AST from a Python value.
344342
ast_from_value,
345-
# A helper to use within recursive-descent visitors which need to be aware
346-
# of the GraphQL type system.
343+
# A helper to use within recursive-descent visitors which need to be aware of the
344+
# GraphQL type system.
347345
TypeInfo,
348346
# Coerces a Python value to a GraphQL type, or produces errors.
349347
coerce_value,

graphql/error/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""GraphQL Errors
22
3-
The :mod:`graphql.error` package is responsible for creating and formatting
4-
GraphQL errors.
3+
The :mod:`graphql.error` package is responsible for creating and formatting GraphQL
4+
errors.
55
"""
66

77
from .graphql_error import GraphQLError

graphql/error/format_error.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
def format_error(error: "GraphQLError") -> dict:
1111
"""Format a GraphQL error
1212
13-
Given a GraphQLError, format it according to the rules described by the
14-
Response Format, Errors section of the GraphQL Specification.
13+
Given a GraphQLError, format it according to the rules described by the "Response
14+
Format, Errors" section of the GraphQL Specification.
1515
"""
1616
if not error:
1717
raise ValueError("Received null or undefined error.")

graphql/error/graphql_error.py

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414
class GraphQLError(Exception):
1515
"""GraphQL Error
1616
17-
A GraphQLError describes an Error found during the parse, validate, or
18-
execute phases of performing a GraphQL operation. In addition to a message,
19-
it also includes information about the locations in a GraphQL document
20-
and/or execution result that correspond to the Error.
17+
A GraphQLError describes an Error found during the parse, validate, or execute
18+
phases of performing a GraphQL operation. In addition to a message, it also includes
19+
information about the locations in a GraphQL document and/or execution result that
20+
correspond to the Error.
2121
"""
2222

2323
message: str
@@ -29,12 +29,12 @@ class GraphQLError(Exception):
2929
locations: Optional[List["SourceLocation"]]
3030
"""Source locations
3131
32-
A list of (line, column) locations within the source
33-
GraphQL document which correspond to this error.
32+
A list of (line, column) locations within the source GraphQL document which
33+
correspond to this error.
3434
35-
Errors during validation often contain multiple locations, for example
36-
to point out two things with the same name. Errors during execution
37-
include a single location, the field which produced the error.
35+
Errors during validation often contain multiple locations, for example to point out
36+
two things with the same name. Errors during execution include a single location,
37+
the field which produced the error.
3838
"""
3939

4040
path: Optional[List[Union[str, int]]]
@@ -43,22 +43,22 @@ class GraphQLError(Exception):
4343
nodes: Optional[List["Node"]]
4444
"""The source GraphQL document for the first location of this error
4545
46-
Note that if this Error represents more than one node, the source
47-
may not represent nodes after the first node.
46+
Note that if this Error represents more than one node, the source may not represent
47+
nodes after the first node.
4848
"""
4949

5050
source: Optional["Source"]
5151
"""The source GraphQL document for the first location of this error
5252
53-
Note that if this Error represents more than one node, the source may
54-
not represent nodes after the first node.
53+
Note that if this Error represents more than one node, the source may not represent
54+
nodes after the first node.
5555
"""
5656

5757
positions: Optional[Sequence[int]]
5858
"""Error positions
5959
60-
A list of character offsets within the source GraphQL document
61-
which correspond to this error.
60+
A list of character offsets within the source GraphQL document which correspond
61+
to this error.
6262
"""
6363

6464
original_error: Optional[Exception]

graphql/error/located_error.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ def located_error(
1515
) -> GraphQLError:
1616
"""Located GraphQL Error
1717
18-
Given an arbitrary Error, presumably thrown while attempting to execute a
19-
GraphQL operation, produce a new GraphQLError aware of the location in the
20-
document responsible for the original Error.
18+
Given an arbitrary Error, presumably thrown while attempting to execute a GraphQL
19+
operation, produce a new GraphQLError aware of the location in the document
20+
responsible for the original Error.
2121
"""
2222
if original_error:
23-
# Note: this uses a brand-check to support GraphQL errors originating
24-
# from other contexts.
23+
# Note: this uses a brand-check to support GraphQL errors originating from
24+
# other contexts.
2525
try:
2626
if isinstance(original_error.path, list): # type: ignore
2727
return original_error # type: ignore

graphql/error/print_error.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def print_error(error: "GraphQLError") -> str:
4141
def highlight_source_at_location(source: "Source", location: "SourceLocation") -> str:
4242
"""Highlight source at given location.
4343
44-
This renders a helpful description of the location of the error in the
45-
GraphQL Source document.
44+
This renders a helpful description of the location of the error in the GraphQL
45+
Source document.
4646
"""
4747
first_line_column_offset = source.location_offset.column - 1
4848
body = " " * first_line_column_offset + source.body

0 commit comments

Comments
 (0)