@@ -203,7 +203,7 @@ import nonexistent
203203None + ''
204204[out]
205205main:1: error: Cannot find module named 'nonexistent'
206- main:1: note: (Perhaps setting MYPYPATH would help)
206+ main:1: note: (Perhaps setting MYPYPATH or using the "--silent" flag would help)
207207main:2: error: Unsupported left operand type for + (None)
208208
209209[case testTypeCheckWithUnknownModule2]
@@ -215,7 +215,7 @@ m.x = ''
215215x = 1
216216[out]
217217main:1: error: Cannot find module named 'nonexistent'
218- main:1: note: (Perhaps setting MYPYPATH would help)
218+ main:1: note: (Perhaps setting MYPYPATH or using the "--silent" flag would help)
219219main:2: error: Unsupported left operand type for + (None)
220220main:4: error: Incompatible types in assignment (expression has type "str", variable has type "int")
221221
@@ -228,7 +228,7 @@ m.x = ''
228228x = 1
229229[out]
230230main:1: error: Cannot find module named 'nonexistent'
231- main:1: note: (Perhaps setting MYPYPATH would help)
231+ main:1: note: (Perhaps setting MYPYPATH or using the "--silent" flag would help)
232232main:2: error: Unsupported left operand type for + (None)
233233main:4: error: Incompatible types in assignment (expression has type "str", variable has type "int")
234234
@@ -237,7 +237,7 @@ import nonexistent, another
237237None + ''
238238[out]
239239main:1: error: Cannot find module named 'nonexistent'
240- main:1: note: (Perhaps setting MYPYPATH would help)
240+ main:1: note: (Perhaps setting MYPYPATH or using the "--silent" flag would help)
241241main:1: error: Cannot find module named 'another'
242242main:2: error: Unsupported left operand type for + (None)
243243
@@ -246,23 +246,23 @@ import nonexistent as x
246246None + ''
247247[out]
248248main:1: error: Cannot find module named 'nonexistent'
249- main:1: note: (Perhaps setting MYPYPATH would help)
249+ main:1: note: (Perhaps setting MYPYPATH or using the "--silent" flag would help)
250250main:2: error: Unsupported left operand type for + (None)
251251
252252[case testTypeCheckWithUnknownModuleUsingFromImport]
253253from nonexistent import x
254254None + ''
255255[out]
256256main:1: error: Cannot find module named 'nonexistent'
257- main:1: note: (Perhaps setting MYPYPATH would help)
257+ main:1: note: (Perhaps setting MYPYPATH or using the "--silent" flag would help)
258258main:2: error: Unsupported left operand type for + (None)
259259
260260[case testTypeCheckWithUnknownModuleUsingImportStar]
261261from nonexistent import *
262262None + ''
263263[out]
264264main:1: error: Cannot find module named 'nonexistent'
265- main:1: note: (Perhaps setting MYPYPATH would help)
265+ main:1: note: (Perhaps setting MYPYPATH or using the "--silent" flag would help)
266266main:2: error: Unsupported left operand type for + (None)
267267
268268[case testAccessingUnknownModule]
@@ -271,15 +271,15 @@ xyz.foo()
271271xyz()
272272[out]
273273main:1: error: Cannot find module named 'xyz'
274- main:1: note: (Perhaps setting MYPYPATH would help)
274+ main:1: note: (Perhaps setting MYPYPATH or using the "--silent" flag would help)
275275
276276[case testAccessingUnknownModule2]
277277import xyz, bar
278278xyz.foo()
279279bar()
280280[out]
281281main:1: error: Cannot find module named 'xyz'
282- main:1: note: (Perhaps setting MYPYPATH would help)
282+ main:1: note: (Perhaps setting MYPYPATH or using the "--silent" flag would help)
283283main:1: error: Cannot find module named 'bar'
284284
285285[case testAccessingUnknownModule3]
@@ -288,7 +288,7 @@ xyz.foo()
288288z()
289289[out]
290290main:1: error: Cannot find module named 'xyz'
291- main:1: note: (Perhaps setting MYPYPATH would help)
291+ main:1: note: (Perhaps setting MYPYPATH or using the "--silent" flag would help)
292292main:2: error: Name 'xyz' is not defined
293293
294294[case testAccessingNameImportedFromUnknownModule]
@@ -297,14 +297,14 @@ y.foo()
297297z()
298298[out]
299299main:1: error: Cannot find module named 'xyz'
300- main:1: note: (Perhaps setting MYPYPATH would help)
300+ main:1: note: (Perhaps setting MYPYPATH or using the "--silent" flag would help)
301301
302302[case testAccessingNameImportedFromUnknownModule2]
303303from xyz import *
304304y
305305[out]
306306main:1: error: Cannot find module named 'xyz'
307- main:1: note: (Perhaps setting MYPYPATH would help)
307+ main:1: note: (Perhaps setting MYPYPATH or using the "--silent" flag would help)
308308main:2: error: Name 'y' is not defined
309309
310310[case testAccessingNameImportedFromUnknownModule3]
313313z
314314[out]
315315main:1: error: Cannot find module named 'xyz'
316- main:1: note: (Perhaps setting MYPYPATH would help)
316+ main:1: note: (Perhaps setting MYPYPATH or using the "--silent" flag would help)
317317main:2: error: Name 'y' is not defined
318318
319319[case testUnknownModuleRedefinition]
320320import xab
321321def xab(): pass
322322[out]
323323main:1: error: Cannot find module named 'xab'
324- main:1: note: (Perhaps setting MYPYPATH would help)
324+ main:1: note: (Perhaps setting MYPYPATH or using the "--silent" flag would help)
325325
326326[case testAccessingUnknownModuleFromOtherModule]
327327import x
@@ -333,7 +333,7 @@ import nonexistent
333333[out]
334334main:1: note: In module imported here:
335335tmp/x.py:1: error: Cannot find module named 'nonexistent'
336- tmp/x.py:1: note: (Perhaps setting MYPYPATH would help)
336+ tmp/x.py:1: note: (Perhaps setting MYPYPATH or using the "--silent" flag would help)
337337main:3: error: "module" has no attribute "z"
338338
339339[case testUnknownModuleImportedWithinFunction]
@@ -343,7 +343,7 @@ def foobar(): pass
343343foobar('')
344344[out]
345345main:2: error: Cannot find module named 'foobar'
346- main:2: note: (Perhaps setting MYPYPATH would help)
346+ main:2: note: (Perhaps setting MYPYPATH or using the "--silent" flag would help)
347347main:4: error: Too many arguments for "foobar"
348348
349349[case testUnknownModuleImportedWithinFunction2]
@@ -353,7 +353,7 @@ def x(): pass
353353x('')
354354[out]
355355main:2: error: Cannot find module named 'foobar'
356- main:2: note: (Perhaps setting MYPYPATH would help)
356+ main:2: note: (Perhaps setting MYPYPATH or using the "--silent" flag would help)
357357main:4: error: Too many arguments for "x"
358358
359359[case testRelativeImports]
0 commit comments