diff --git a/mypy/fastparse.py b/mypy/fastparse.py
--- a/mypy/fastparse.py
+++ b/mypy/fastparse.py
@@ -487,11 +487,13 @@ def translate_stmt_list(
             and self.type_ignores
             and min(self.type_ignores) < self.get_lineno(stmts[0])
         ):
-            if self.type_ignores[min(self.type_ignores)]:
+            ignores = self.type_ignores[min(self.type_ignores)]
+            if ignores:
+                joined_ignores = ", ".join(ignores)
                 self.fail(
                     (
                         "type ignore with error code is not supported for modules; "
-                        "use `# mypy: disable-error-code=...`"
+                        f'use `# mypy: disable-error-code="{joined_ignores}"`'
                     ),
                     line=min(self.type_ignores),
                     column=0,

diff --git a/test-data/unit/check-errorcodes.test b/test-data/unit/check-errorcodes.test
--- a/test-data/unit/check-errorcodes.test
+++ b/test-data/unit/check-errorcodes.test
@@ -960,7 +960,11 @@ def f(d: D, s: str) -> None:
 [typing fixtures/typing-typeddict.pyi]
 
 [case testRecommendErrorCode]
-# type: ignore[whatever]  # E: type ignore with error code is not supported for modules; use `# mypy: disable-error-code=...`  [syntax]
+# type: ignore[whatever]  # E: type ignore with error code is not supported for modules; use `# mypy: disable-error-code="whatever"`  [syntax]
+1 + "asdf"
+
+[case testRecommendErrorCode2]
+# type: ignore[whatever, other]  # E: type ignore with error code is not supported for modules; use `# mypy: disable-error-code="whatever, other"`  [syntax]
 1 + "asdf"
 
 [case testShowErrorCodesInConfig]
diff --git a/test-data/unit/check-inline-config.test b/test-data/unit/check-inline-config.test
--- a/test-data/unit/check-inline-config.test
+++ b/test-data/unit/check-inline-config.test
@@ -210,3 +210,12 @@ enable_error_code = ignore-without-code, truthy-bool
 
 \[mypy-tests.*]
 disable_error_code = ignore-without-code
+
+[case testInlineErrorCodesMultipleCodes]
+# mypy: disable-error-code="truthy-bool, ignore-without-code"
+class Foo:
+    pass
+
+foo = Foo()
+if foo: ...
+42 + "no"  # type: ignore

# mypy: disable-error-code=... usage details not documented 
**Documentation**

(Based on a SO question) To disable multiple error codes in a whole file, none of the "obvious" ways works.
Please document that feature in greater detail.

---

Not OK:

```
# mypy: disable-error-code=misc
# mypy: disable-error-code=attr-defined
```

```
# mypy: disable-error-code=misc
# mypy: disable-error-code=attr-defined
```

The problem here is that the last such line seems to overwrite alle previous ones. Don't know if it is a bug.

---

Also not working:

`# mypy: disable-error-code=misc, attr-defined`

`# mypy: disable-error-code=misc attr-defined`

Here the problem is the syntax.

---

The correct command uses quotes, I wouldn't guess that:

`# mypy: disable-error-code="misc, attr-defined"`


mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeSyntaxErrorIgnoreNote mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeWarnUnusedIgnores3 mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeNoAttribute mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeIgnore1 mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeWarnUnusedIgnores4 mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeMissingMultiple mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeUndefinedName mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeIgnore2 mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeWarnUnusedIgnores5 mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeIgnoreWithExtraSpace mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeUnclassifiedError mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeIgnoreMultiple1 mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeWarnUnusedIgnores6_NoDetailWhenSingleErrorCode mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeIgnoreAfterArgComment mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeNoteHasNoCode mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeSyntaxError mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeSyntaxError2 mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeIgnoreMultiple2 mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeIgnoreWithNote mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeMissingWhenRequired mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeSyntaxError3 mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeWarnUnusedIgnores1 mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeBadIgnore mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeMissingDoesntTrampleUnusedIgnoresWarning mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeInvalidTypeArg mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeWarnUnusedIgnores2 mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeBadIgnoreNoExtraComment mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeMissingWholeFileIgnores mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeArgType mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeArgKindAndCount mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeOperators mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeAssignment mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeCannotDetermineType mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeMissingTypeArg mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeInvalidType mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeRedundantCast mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeListOrDictItem mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeUnionAttribute mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeNeedTypeAnnotation mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeInvalidCommentSignature mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeBadOverride mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeFunctionHasNoAnnotation mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeReturnValue mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeCallUntypedFunction mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeTypedDict mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeNonOverlappingEquality mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeMissingReturnValueInReturnStatement mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeMissingModule mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeNewTypeNotSubclassable mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeIndexing mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeAlreadyDefined mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeTypedDictNoteIgnore mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeMissingReturn mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeOverloadVariant mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeFormatCall mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeReturnValueNotExpected mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeIgnoreNamedDefinedNote mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeOverloadVariantIgnore mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeAnyFromUnfollowedImport mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeTypedDictSubCodeIgnore mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeFunctionDoesNotReturnValue mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeAssignToMethod mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeProtocolProblemsIgnore mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeReturnAny mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeInstantiateAbstract mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCode__exit__Return mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeDefinedHereNoteIgnore mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testRedundantExpressions mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeNoneReturnNoteIgnore mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeVarianceNoteIgnore mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeUnionNoteIgnore mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeOverloadedOperatorMethod mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testNamedTupleNameMismatch mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeTypeIgnoreMisspelled1 mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeMultiLineBinaryOperatorOperand mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeTypeIgnoreMisspelled2 mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testTruthyBool mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testTypedDictNameMismatch mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testTruthyFunctions mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testSliceInCustomTensorType mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testNoOverloadImplementation mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeSpecialArgTypeErrors mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testTruthyIterable mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testShowErrorCodesInConfig mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testSliceInDict39 mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testNoteAboutChangedTypedDictErrorCode mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testErrorCodeUnsafeSuper_no_empty mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testDedicatedErrorCodeForEmpty_no_empty mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testSliceInDict38 mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testUncheckedAnnotationCodeShown mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testUncheckedAnnotationSuppressed mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testDedicatedErrorCodeTypeAbstract mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testMethodAssignCoveredByAssignmentIgnore mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testMethodAssignmentSuppressed mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testMethodAssignCoveredByAssignmentUnused mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testMethodAssignCoveredByAssignmentFlag mypy/test/testcheck.py::TypeCheckSuite::check-inline-config.test::testInlineSimple2 mypy/test/testcheck.py::TypeCheckSuite::check-inline-config.test::testInlineSimple1 mypy/test/testcheck.py::TypeCheckSuite::check-inline-config.test::testInlineSimple4 mypy/test/testcheck.py::TypeCheckSuite::check-inline-config.test::testInlineSimple3 mypy/test/testcheck.py::TypeCheckSuite::check-inline-config.test::testInlineList mypy/test/testcheck.py::TypeCheckSuite::check-inline-config.test::testInlineInvert1 mypy/test/testcheck.py::TypeCheckSuite::check-inline-config.test::testInlineInvert2 mypy/test/testcheck.py::TypeCheckSuite::check-inline-config.test::testInlineIncremental3 mypy/test/testcheck.py::TypeCheckSuite::check-inline-config.test::testInlineError1 mypy/test/testcheck.py::TypeCheckSuite::check-inline-config.test::testInlineIncremental1 mypy/test/testcheck.py::TypeCheckSuite::check-inline-config.test::testInlineIncremental2 mypy/test/testcheck.py::TypeCheckSuite::check-inline-config.test::testInlineErrorCodes mypy/test/testcheck.py::TypeCheckSuite::check-inline-config.test::testInlineErrorCodesOverrideConfig mypy/test/testcheck.py::TypeCheckSuite::check-inline-config.test::testInlineError2 mypy/test/testcheck.py::TypeCheckSuite::check-inline-config.test::testInlineStrict mypy/test/testcheck.py::TypeCheckSuite::check-inline-config.test::testInlineErrorCodesMultipleCodes
mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testRecommendErrorCode mypy/test/testcheck.py::TypeCheckSuite::check-errorcodes.test::testRecommendErrorCode2