Remove Linter.remove by inlining the remaining bits
@@ -559,8 +559,8 @@ class Linter(metaclass=LinterMeta):
persist.views[vid] = view
syntax = util.get_syntax(view)
- if not syntax:
- cls.remove(vid)
+ if not syntax: # seems like a very rare, edge case
+ persist.view_linters.pop(vid, None)
return
persist.debug("detected syntax: " + syntax)
@@ -598,15 +598,6 @@ class Linter(metaclass=LinterMeta):
elif reset and not linters and vid in persist.view_linters:
del persist.view_linters[vid]
- @classmethod
- def remove(cls, vid):
- """Remove a the mapping between a view and its set of linters."""
- if vid in persist.view_linters:
- for linters in persist.view_linters[vid]:
- linters.clear()
-
- del persist.view_linters[vid]
-
@classmethod
def which(cls, cmd):
"""Return full path to a given executable.
