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 exceptoff. This includes thebasicpreset, which Pyrefly uses when it finds no configuration.default: every preset exceptoffandbasic.strict: only thestrictandallpresets. 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 message | Pyrefly error kind(s) | Enabled by | Notes |
|---|---|---|---|
E1101 no-member | missing-attribute | default | |
I1101 c-extension-no-member | missing-attribute | default | Pyrefly reads type stubs for compiled modules rather than introspecting them, so it reports missing members of C extensions like any other module. |
E1102 not-callable | not-callable | default | |
E1111 assignment-from-no-return | None | Pyrefly allows assigning a None result. Invalid uses of the assigned value are reported where they happen. | |
E1120 no-value-for-parameter | missing-argument | default | |
E1121 too-many-function-args | bad-argument-count | default | |
E1123 unexpected-keyword-arg | unexpected-keyword | basic | |
E1124 redundant-keyword-arg | bad-keyword-argument | basic | |
E1125 missing-kwoa | missing-argument | default | |
E1126 invalid-sequence-index | bad-index | default | |
E1127 invalid-slice-index | bad-index | default | |
E1128 assignment-from-none | None | Same as assignment-from-no-return. | |
E1129 not-context-manager | bad-context-manager | default | |
E1145 async-context-manager-with-regular-with | bad-context-manager | default | |
E1130 invalid-unary-operand-type | unsupported-operation | default | |
E1131 unsupported-binary-operation | unsupported-operation | default | |
E1132 repeated-keyword | bad-keyword-argument, potential-bad-keyword-argument | basic, strict | Pyrefly 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-iterable | not-iterable | default | |
E1134 not-a-mapping | bad-unpacking | basic | |
E1135 unsupported-membership-test | not-iterable | default | |
E1136 unsubscriptable-object | bad-index | default | |
E1137 unsupported-assignment-operation | unsupported-operation | default | |
E1138 unsupported-delete-operation | unsupported-operation | default | |
E1139 invalid-metaclass | invalid-inheritance | default | |
E1141 dict-iter-missing-items | None | Pyrefly 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-async | invalid-syntax | basic | |
E1143 unhashable-member | None | Pyrefly 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-step | bad-index | default | |
W1113 keyword-arg-before-vararg | None | This is a style check, and the signature is valid. | |
W1114 arguments-out-of-order | None | This is a heuristic based on argument names, and the call is valid. | |
W1115 non-str-assignment-to-dunder-name | bad-assignment | default | |
W1116 isinstance-second-argument-not-valid-type | invalid-argument | default | |
W1117 kwarg-superseded-by-positional-arg | None | The call is valid, because the keyword argument goes into **kwargs. |