MCPcopy Index your code
hub / github.com/python/mypy / add_explicitly_new

Method add_explicitly_new

mypy/dmypy_server.py:917–933  ·  view source on GitHub ↗
(
        self, sources: list[BuildSource], changed: list[tuple[str, str]]
    )

Source from the content-addressed store, hash-verified

915 return changed, removed
916
917 def add_explicitly_new(
918 self, sources: list[BuildSource], changed: list[tuple[str, str]]
919 ) -> None:
920 # Always add modules that were (re-)added, since they may be detected as not changed by
921 # fswatcher (if they were actually not changed), but they may still need to be checked
922 # in case they had errors before they were deleted from sources on previous runs.
923 previous_modules = {source.module for source in self.previous_sources}
924 changed_set = set(changed)
925 changed.extend(
926 [
927 (source.module, source.path)
928 for source in sources
929 if source.path
930 and source.module not in previous_modules
931 and (source.module, source.path) not in changed_set
932 ]
933 )
934
935 def cmd_inspect(
936 self,

Callers 2

_find_changedMethod · 0.95

Calls 2

setClass · 0.85
extendMethod · 0.80

Tested by

no test coverage detected