Skip to content

Commit 3e63fc1

Browse files
pre-commit-ci[bot]gnikit
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 918d755 commit 3e63fc1

File tree

4 files changed

+27
-22
lines changed

4 files changed

+27
-22
lines changed

fortls/langserver.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1082,7 +1082,12 @@ def create_hover(string: str, docs: str | None):
10821082
# Construct hover information
10831083
var_type: int = var_obj.get_type()
10841084
hover_array = []
1085-
if var_type in (SUBROUTINE_TYPE_ID, FUNCTION_TYPE_ID, MODULE_TYPE_ID, CLASS_TYPE_ID):
1085+
if var_type in (
1086+
SUBROUTINE_TYPE_ID,
1087+
FUNCTION_TYPE_ID,
1088+
MODULE_TYPE_ID,
1089+
CLASS_TYPE_ID,
1090+
):
10861091
hover_array.append(var_obj.get_hover_md(long=True))
10871092
elif var_type == INTERFACE_TYPE_ID:
10881093
for member in var_obj.mems:

test/setup_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def run_request(request, fortls_args: list[str] = None):
2929
"-m",
3030
"fortls",
3131
"--incremental_sync",
32-
"--disable_autoupdate"
32+
"--disable_autoupdate",
3333
]
3434
if fortls_args:
3535
# Input args might not be sanitised, fix that

test/test_server_documentation.py

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -310,13 +310,13 @@ def test_doxygen_doc_for_module_use():
310310
assert errcode == 0
311311

312312
ref = (
313-
(0, '```fortran90'),
314-
(1, 'MODULE doxygen_doc_mod'),
315-
(2, '```'),
316-
(3, '-----'),
317-
(4, 'module doc for doxygen_doc_mod'),
318-
(5, ''),
319-
(6, 'with info'),
313+
(0, "```fortran90"),
314+
(1, "MODULE doxygen_doc_mod"),
315+
(2, "```"),
316+
(3, "-----"),
317+
(4, "module doc for doxygen_doc_mod"),
318+
(5, ""),
319+
(6, "with info"),
320320
)
321321
check_return(results[1], ref)
322322

@@ -329,10 +329,10 @@ def test_ford_doc_for_module_use():
329329
assert errcode == 0
330330

331331
ref = (
332-
(0, '```fortran90'),
333-
(1, 'MODULE ford_doc_mod'),
334-
(2, '```'),
335-
(3, '-----'),
332+
(0, "```fortran90"),
333+
(1, "MODULE ford_doc_mod"),
334+
(2, "```"),
335+
(3, "-----"),
336336
(4, "Doc for ford_doc_mod"),
337337
)
338338
check_return(results[1], ref)
@@ -346,10 +346,10 @@ def test_doxygen_doc_for_type():
346346
assert errcode == 0
347347

348348
ref = (
349-
(0, '```fortran90'),
350-
(1, 'TYPE :: a_t'),
351-
(2, '```'),
352-
(3, '-----'),
349+
(0, "```fortran90"),
350+
(1, "TYPE :: a_t"),
351+
(2, "```"),
352+
(3, "-----"),
353353
(4, "Doc for a_t"),
354354
)
355355
check_return(results[1], ref)
@@ -363,10 +363,10 @@ def test_ford_doc_for_type():
363363
assert errcode == 0
364364

365365
ref = (
366-
(0, '```fortran90'),
367-
(1, 'TYPE :: b_t'),
368-
(2, '```'),
369-
(3, '-----'),
366+
(0, "```fortran90"),
367+
(1, "TYPE :: b_t"),
368+
(2, "```"),
369+
(3, "-----"),
370370
(4, "Doc for b_t"),
371371
)
372372
check_return(results[1], ref)

test/test_source/hover/types.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ module some_mod
99

1010
type, extends(extends_t) :: a_t
1111
end type
12-
end module
12+
end module

0 commit comments

Comments
 (0)