Skip to main content

Pylint Typecheck Messages to Pyrefly

Pylint is a linter, but its typecheck checker reports many of the same problems as a type checker, such as missing attributes and bad call arguments. If you use Pyrefly, you can usually disable these Pylint messages and rely on the corresponding Pyrefly error kinds instead.

There is no automatic migration from Pylint. Use the table below to find the Pyrefly error kind to configure or suppress in place of each Pylint message. For example, # pylint: disable=no-member corresponds to # pyrefly: ignore[missing-attribute].

How to read the table​

The Enabled by column shows which presets report each Pyrefly error kind:

  • basic: every preset except off. This includes the basic preset, which Pyrefly uses when it finds no configuration.
  • default: every preset except off and basic.
  • strict: only the strict and all presets. These error kinds are off by default.

You can also turn individual error kinds on or off with the errors setting.

Complete mapping​

The mapping was checked by running Pyrefly on the example code from each message's page in the Pylint documentation.

Pylint messagePyrefly error kind(s)Enabled byNotes
E1101 no-membermissing-attributedefault
I1101 c-extension-no-membermissing-attributedefaultPyrefly reads type stubs for compiled modules rather than introspecting them, so it reports missing members of C extensions like any other module.
E1102 not-callablenot-callabledefault
E1111 assignment-from-no-returnNonePyrefly allows assigning a None result. Invalid uses of the assigned value are reported where they happen.
E1120 no-value-for-parametermissing-argumentdefault
E1121 too-many-function-argsbad-argument-countdefault
E1123 unexpected-keyword-argunexpected-keywordbasic
E1124 redundant-keyword-argbad-keyword-argumentbasic
E1125 missing-kwoamissing-argumentdefault
E1126 invalid-sequence-indexbad-indexdefault
E1127 invalid-slice-indexbad-indexdefault
E1128 assignment-from-noneNoneSame as assignment-from-no-return.
E1129 not-context-managerbad-context-managerdefault
E1145 async-context-manager-with-regular-withbad-context-managerdefault
E1130 invalid-unary-operand-typeunsupported-operationdefault
E1131 unsupported-binary-operationunsupported-operationdefault
E1132 repeated-keywordbad-keyword-argument, potential-bad-keyword-argumentbasic, strictPyrefly reports bad-keyword-argument when the repeated keyword is a required key of an unpacked TypedDict. Pylint's examples unpack dictionary literals, which Pyrefly reports as potential-bad-keyword-argument. That error kind is off by default.
E1133 not-an-iterablenot-iterabledefault
E1134 not-a-mappingbad-unpackingbasic
E1135 unsupported-membership-testnot-iterabledefault
E1136 unsubscriptable-objectbad-indexdefault
E1137 unsupported-assignment-operationunsupported-operationdefault
E1138 unsupported-delete-operationunsupported-operationdefault
E1139 invalid-metaclassinvalid-inheritancedefault
E1141 dict-iter-missing-itemsNonePyrefly only reports this when the dictionary's key type cannot be unpacked, for example not-iterable for int keys. String keys are iterable.
E1142 await-outside-asyncinvalid-syntaxbasic
E1143 unhashable-memberNonePyrefly does not check that dictionary keys and set members are hashable. It reports bad-index if the key does not match the dictionary's key type.
E1144 invalid-slice-stepbad-indexdefault
W1113 keyword-arg-before-varargNoneThis is a style check, and the signature is valid.
W1114 arguments-out-of-orderNoneThis is a heuristic based on argument names, and the call is valid.
W1115 non-str-assignment-to-dunder-namebad-assignmentdefault
W1116 isinstance-second-argument-not-valid-typeinvalid-argumentdefault
W1117 kwarg-superseded-by-positional-argNoneThe call is valid, because the keyword argument goes into **kwargs.