File tree Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Expand file tree Collapse file tree 1 file changed +10
-13
lines changed Original file line number Diff line number Diff line change @@ -152,19 +152,16 @@ def source_token_lines(source: str) -> TSourceTokenLines:
152152 if keyword .iskeyword (ttext ):
153153 # Hard keywords are always keywords.
154154 tok_class = "key"
155- elif sys .version_info >= (3 , 10 ): # PYVERSIONS
156- # Need the version_info check to keep mypy from borking
157- # on issoftkeyword here.
158- if env .PYBEHAVIOR .soft_keywords and keyword .issoftkeyword (ttext ):
159- # Soft keywords appear at the start of their line.
160- if len (line ) == 0 :
161- is_start_of_line = True
162- elif (len (line ) == 1 ) and line [0 ][0 ] == "ws" :
163- is_start_of_line = True
164- else :
165- is_start_of_line = False
166- if is_start_of_line and sline in soft_key_lines :
167- tok_class = "key"
155+ elif env .PYBEHAVIOR .soft_keywords and keyword .issoftkeyword (ttext ):
156+ # Soft keywords appear at the start of their line.
157+ if len (line ) == 0 :
158+ is_start_of_line = True
159+ elif (len (line ) == 1 ) and line [0 ][0 ] == "ws" :
160+ is_start_of_line = True
161+ else :
162+ is_start_of_line = False
163+ if is_start_of_line and sline in soft_key_lines :
164+ tok_class = "key"
168165 line .append ((tok_class , part ))
169166 mark_end = True
170167 scol = 0
You can’t perform that action at this time.
0 commit comments