<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def type_check(self, filename):
 """Update type checking when user saves buffer."""

        self.log.debug('type_check: in')
        self.editor.clean_errors()
        self.send_request(
            {"typehint": "TypecheckFilesReq",
             "files": [self.editor.path()]})