       for token in tokenizedLine.tokens
         if not token.firstNonWhitespaceIndex
           return [[lineNumber, 0], [lineNumber, offset]]
-        if token.firstNonWhitespaceIndex isnt token.bufferDelta
+        if token.firstNonWhitespaceIndex isnt token.value.length
           return [[lineNumber, 0], [lineNumber, offset + token.firstNonWhitespaceIndex]]
-        offset += token.bufferDelta
+        offset += token.value.length
     when 'E262', 'E265'
       # E262 - inline comment should start with '# '
       # E265 - block comment should start with '# '

tokenizedLineForRow = (textEditor, lineNumber) ->
  textEditor.displayBuffer.tokenizedBuffer.tokenizedLineForRow(lineNumber)
fs = require('fs')
path = require('path')
{CompositeDisposable} = require 'atom'

      for token in tokenizedLine.tokens
        if 'meta.function-call.python' in token.scopes
          if token.value is 'locals'
            return [[lineNumber, offset], [lineNumber, offset + token.value.length]]
        offset += token.value.length
    when 'W291'
      # W291 - trailing whitespace
      screenLine = tokenizedLineForRow(textEditor, lineNumber)
