Skip to content

Commit 22cf8d5

Browse files
committed
refactor(flake8): address E721 lint error
1 parent d7f6afb commit 22cf8d5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

fortls/parsers/internal/ast.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@ def get_scopes(self, line_number: int = None):
192192
scope_list = []
193193
for scope in self.scope_list:
194194
if (line_number >= scope.sline) and (line_number <= scope.eline):
195-
if type(scope.parent) == Interface:
195+
if type(scope.parent) is Interface:
196196
for use_stmnt in scope.use:
197-
if type(use_stmnt) != Import:
197+
if type(use_stmnt) is not Import:
198198
continue
199199
# Exclude the parent and all other scopes
200200
if use_stmnt.import_type == ImportTypes.NONE:

fortls/parsers/internal/scope.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ def check_use(self, obj_tree):
216216
last_use_line = -1
217217
for use_stmnt in self.use:
218218
last_use_line = max(last_use_line, use_stmnt.line_number)
219-
if type(use_stmnt) == Import:
219+
if type(use_stmnt) is Import:
220220
if (self.parent is None) or (
221221
self.parent.get_type() != INTERFACE_TYPE_ID
222222
):

0 commit comments

Comments
 (0)