Skip to content

Commit e4614bd

Browse files
committed
Improves code style
1 parent 303571a commit e4614bd

File tree

1 file changed

+11
-12
lines changed

1 file changed

+11
-12
lines changed

fortls/langserver.py

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -321,9 +321,7 @@ def map_types(type, in_class=False):
321321
continue
322322
else:
323323
scope_type = map_types(scope.get_type())
324-
tmp_out = {}
325-
tmp_out["name"] = scope.name
326-
tmp_out["kind"] = scope_type
324+
tmp_out = {"name": scope.name, "kind": scope_type}
327325
sline = scope.sline - 1
328326
eline = scope.eline - 1
329327
tmp_out["location"] = {
@@ -341,17 +339,18 @@ def map_types(type, in_class=False):
341339
# If class add members
342340
if scope.get_type() == CLASS_TYPE_ID and not self.symbol_skip_mem:
343341
for child in scope.children:
344-
tmp_out = {}
345-
tmp_out["name"] = child.name
346-
tmp_out["kind"] = map_types(child.get_type(), True)
347-
tmp_out["location"] = {
348-
"uri": uri,
349-
"range": {
350-
"start": {"line": child.sline - 1, "character": 0},
351-
"end": {"line": child.sline - 1, "character": 0},
342+
tmp_out = {
343+
"name": child.name,
344+
"kind": map_types(child.get_type(), True),
345+
"location": {
346+
"uri": uri,
347+
"range": {
348+
"start": {"line": child.sline - 1, "character": 0},
349+
"end": {"line": child.sline - 1, "character": 0},
350+
},
352351
},
352+
"containerName": scope.name,
353353
}
354-
tmp_out["containerName"] = scope.name
355354
test_output.append(tmp_out)
356355
return test_output
357356

0 commit comments

Comments
 (0)