Skip to content

Add method assignment diagnostic - #4906

Open
WilliamK112 wants to merge 3 commits into
facebook:mainfrom
WilliamK112:codex/method-assign-4161
Open

WilliamK112 wants to merge 3 commits into
facebook:mainfrom
WilliamK112:codex/method-assign-4161

Conversation

@WilliamK112

Copy link
Copy Markdown
Contributor

Summary

  • add a configurable method-assign diagnostic for assignments to class and instance methods, including inherited, static, and class methods
  • keep the diagnostic disabled by default and enable it in the strict and all presets
  • preserve ordinary callable data-field assignment and map mypy method-assign and strict-mode migration to the new error kind
  • document the error kind and preset/migration behavior

Testing

  • python3 test.py --no-test --no-tensor-shapes --no-conformance --no-jsonschema
  • env -u CONDA_PREFIX -u CONDA_DEFAULT_ENV -u VIRTUAL_ENV cargo test -p pyrefly_config
  • cargo test -p pyrefly test_method_assign -- --nocapture

Fixes #4161

AI assistance

Codex assisted with implementation, tests, and documentation. I reviewed the final diff and verified the behavior locally.

Signed-off-by: Ching-Wei Kang <ckang53@wisc.edu>
Signed-off-by: Ching-Wei Kang <ckang53@wisc.edu>
@meta-codesync

meta-codesync Bot commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

This pull request has been imported. If you are a Meta employee, you can view this in D119724851. (Because this pull request was imported automatically, there will not be any future comments.)

@github-actions

This comment has been minimized.

let mut cfg = parse_pyproject_config("[tool.mypy]\nstrict = true\n")?;
assert_eq!(cfg.root.check_unannotated_defs, Some(true));
cfg.configure();
assert_eq!(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should we remove method assign from this test so it only tests unannotated_defs?

@kinto0

kinto0 commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

before merging, would you be able to look into the mypy_primer differences? why do we see such a high number of positives that aren't removing unused-type-ignore errors?

@kinto0 kinto0 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a few questions actually. might be the cause of the mypy_primer diffs

Comment thread pyrefly/lib/alt/attr.rs Outdated
};
let (lookup_found, lookup_not_found, lookup_error) =
self.lookup_attr(attr_base.clone(), attr_name).decompose();
if lookup_found

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we avoid reconstructing method-ness from found_on here? lookup_attr has already applied special lookup semantics, but this helper performs a second, simpler get_class_member lookup that can disagree with the member actually resolved.

For example:

  • C.f can resolve a method from C's metaclass, but this checks only C.
  • TypedDict methods such as items are resolved through TypedDict fallback, but this returns false for all TypedDicts.
  • super() lookup starts after a specific class in the MRO, but this searches from the receiver class, causing both false positives and false negatives when subclasses shadow members.

Could we instead preserve whether the successfully resolved member is a method in the lookup result and diagnose based on that? That would reuse the existing lookup precedence rather than duplicating its AttributeBase1 case split. At minimum, I think we need tests for metaclass methods, TypedDict methods, and shadowing through super().

@github-actions github-actions Bot added size/xl and removed size/l labels Sep 16, 2026
@WilliamK112

WilliamK112 commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the careful review. I pushed fdddaaf: attribute lookup now carries method-ness from the resolved member, including the metaclass, TypedDict, and super() paths, rather than re-looking up from found_on. I added tests for those cases (including both directions of super() shadowing) and separated the strict-mode configuration assertion from the unannotated-definitions test. Locally, the 211 attribute tests, focused configuration tests, and repository formatting/lint check pass.

I also traced the mypy_primer numbers. The refreshed mypy_primer diff has 319 added diagnostics, all [method-assign], and 121 removed diagnostics, all [unused-type-ignore] (the prior run was +318/-118). The primer wrapper (scripts/pyrefly_primer_wrapper.sh) explicitly passes --preset=all to every check on both revisions, so this corpus intentionally surfaces off-by-default diagnostics; the large count does not mean method-assign is enabled in Pyrefly’s default preset. Most additions are method monkey-patching/mocking sites. The default severity remains Ignore; strict and all enable it, as discussed on #4161. I will watch the refreshed CI/primer run for any unexpected differences.

@github-actions

Copy link
Copy Markdown

Diff from mypy_primer, showing the effect of this PR on open source code:

============================================================
SUMMARY
============================================================
Total: +319 new errors, -121 fixed errors
By preset: +0/-0 (default), +0/-0 (strict)

Projects with changes (57):
  pip: +0 -3
  tornado: +0 -1
  mkdocs: +4 -1
  openlibrary: +1 -0
  cloud-init: +28 -1
  egglog-python: +2 -0
  cki-lib: +10 -0
  mitmproxy: +5 -7
  steam.py: +3 -0
  rotki: +2 -13
  flake8: +2 -0
  pytest: +0 -3
  pyjwt: +0 -1
  jax: +58 -0
  spark: +1 -0
  prefect: +1 -0
  cwltool: +1 -0
  alerta: +1 -2
  urllib3: +0 -1
  scikit-learn: +5 -0
  setuptools: +6 -2
  pwndbg: +3 -0
  comtypes: +1 -1
  scikit-build-core: +0 -3
  apprise: +27 -0
  schemathesis: +0 -1
  manticore: +1 -0
  cibuildwheel: +1 -0
  streamlit: +6 -4
  hydra-zen: +1 -0
  ibis: +3 -0
  zulip: +0 -1
  bandersnatch: +0 -23
  zope.interface: +4 -0
  pywin32: +0 -1
  dragonchain: +95 -0
  pandas: +2 -0
  dd-trace-py: +12 -5
  meson: +2 -0
  mypy: +0 -3
  werkzeug: +2 -0
  core: +1 -7
  trio: +0 -3
  jinja: +0 -1
  xarray: +1 -0
  rich: +0 -1
  typeshed-stats: +1 -0
  poetry: +0 -5
  pydantic: +2 -0
  spack: +8 -0
  discord.py: +14 -6
  porcupine: +0 -1
  scrapy: +1 -14
  PyGithub: +0 -1
  optuna: +0 -2
  graphql-core: +0 -3
  schema_salad: +1 -0
============================================================

FULL DIFF DETAILS
------------------------------------------------------------

pip (https://github.com/pypa/pip)
- ERROR src/pip/_internal/network/session.py:222:42-43: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/pip/_vendor/cachecontrol/adapter.py:148:73-74: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/pip/_vendor/rich/repr.py:93:35-36: Unused `# type: ignore` comment [unused-type-ignore]

tornado (https://github.com/tornadoweb/tornado)
- ERROR tornado/test/ioloop_test.py:44:67-68: Unused `# type: ignore` comment [unused-type-ignore]

mkdocs (https://github.com/mkdocs/mkdocs)
- ERROR mkdocs/livereload/__init__.py:159:42-43: Unused `# type: ignore` comment [unused-type-ignore]
+ ERROR mkdocs/tests/livereload_tests.py:21:9-28: Cannot assign to method `close` [method-assign]
+ ERROR mkdocs/tests/structure/file_tests.py:660:9-25: Cannot assign to method `is_modified` [method-assign]
+ ERROR mkdocs/tests/structure/file_tests.py:671:9-25: Cannot assign to method `is_modified` [method-assign]
+ ERROR mkdocs/tests/structure/file_tests.py:682:9-25: Cannot assign to method `is_modified` [method-assign]

openlibrary (https://github.com/internetarchive/openlibrary)
+ ERROR openlibrary/core/schema.py:110:5-15: Cannot assign to method `sql` [method-assign]

cloud-init (https://github.com/canonical/cloud-init)
- ERROR cloudinit/config/schema.py:523:48-49: Unused `# type: ignore` comment [unused-type-ignore]
+ ERROR cloudinit/net/network_manager.py:56:9-32: Cannot assign to method `optionxform` [method-assign]
+ ERROR cloudinit/sources/helpers/vmware/imc/config_file.py:61:9-27: Cannot assign to method `optionxform` [method-assign]
+ ERROR tests/unittests/config/test_cc_growpart.py:522:9-37: Cannot assign to method `device_part_info` [method-assign]
+ ERROR tests/unittests/config/test_cc_growpart.py:556:9-37: Cannot assign to method `device_part_info` [method-assign]
+ ERROR tests/unittests/runs/test_simple_run.py:78:9-39: Cannot assign to method `_find_networking_config` [method-assign]
+ ERROR tests/unittests/sources/test_altcloud.py:157:9-29: Cannot assign to method `user_data_rhevm` [method-assign]
+ ERROR tests/unittests/sources/test_altcloud.py:169:9-31: Cannot assign to method `user_data_vsphere` [method-assign]
+ ERROR tests/unittests/sources/test_altcloud.py:181:9-29: Cannot assign to method `user_data_rhevm` [method-assign]
+ ERROR tests/unittests/sources/test_altcloud.py:190:9-31: Cannot assign to method `user_data_vsphere` [method-assign]
+ ERROR tests/unittests/sources/test_altcloud.py:225:9-29: Cannot assign to method `user_data_rhevm` [method-assign]
+ ERROR tests/unittests/sources/test_altcloud.py:235:9-31: Cannot assign to method `user_data_vsphere` [method-assign]
+ ERROR tests/unittests/sources/test_azure.py:1376:13-37: Cannot assign to method `get_tmp_exec_path` [method-assign]
+ ERROR tests/unittests/sources/test_digitalocean.py:155:13-28: Cannot assign to method `_get_sysinfo` [method-assign]
+ ERROR tests/unittests/sources/test_exoscale.py:72:9-21: Cannot assign to method `ds_detect` [method-assign]
+ ERROR tests/unittests/sources/test_exoscale.py:114:9-21: Cannot assign to method `ds_detect` [method-assign]
+ ERROR tests/unittests/sources/test_exoscale.py:150:9-21: Cannot assign to method `ds_detect` [method-assign]
+ ERROR tests/unittests/sources/test_exoscale.py:216:9-21: Cannot assign to method `ds_detect` [method-assign]
+ ERROR tests/unittests/sources/test_openstack.py:849:9-34: Cannot assign to method `_read_ec2_metadata` [method-assign]
+ ERROR tests/unittests/sources/test_scaleway.py:194:9-33: Cannot assign to method `get_tmp_exec_path` [method-assign]
+ ERROR tests/unittests/sources/test_upcloud.py:166:9-24: Cannot assign to method `_get_sysinfo` [method-assign]
+ ERROR tests/unittests/sources/test_upcloud.py:192:9-24: Cannot assign to method `_get_sysinfo` [method-assign]
+ ERROR tests/unittests/test_stages.py:99:9-34: Cannot assign to method `is_new_instance` [method-assign]
+ ERROR tests/unittests/test_stages.py:455:9-42: Cannot assign to method `_find_networking_config` [method-assign]
+ ERROR tests/unittests/test_stages.py:485:9-42: Cannot assign to method `_find_networking_config` [method-assign]
+ ERROR tests/unittests/test_stages.py:515:9-34: Cannot assign to method `is_new_instance` [method-assign]
+ ERROR tests/unittests/test_stages.py:535:9-42: Cannot assign to method `_find_networking_config` [method-assign]
+ ERROR tests/unittests/test_stages.py:568:9-42: Cannot assign to method `_find_networking_config` [method-assign]
+ ERROR tests/unittests/test_stages.py:570:9-34: Cannot assign to method `is_new_instance` [method-assign]

egglog-python (https://github.com/egraphs-good/egglog-python)
+ ERROR python/egglog/egraph.py:1618:9-33: Cannot assign to method `__egg_decls_thunk__` [method-assign]
+ ERROR python/egglog/egraph.py:1689:9-33: Cannot assign to method `__egg_decls_thunk__` [method-assign]

cki-lib (https://gitlab.com/cki-project/cki-lib)
+ ERROR tests/test_cronjob.py:38:9-21: Cannot assign to method `run` [method-assign]
+ ERROR tests/test_cronjob.py:71:9-21: Cannot assign to method `run` [method-assign]
+ ERROR tests/test_cronjob.py:94:9-21: Cannot assign to method `run` [method-assign]
+ ERROR tests/test_cronjob.py:127:9-22: Cannot assign to method `_run` [method-assign]
+ ERROR tests/test_cronjob.py:139:9-22: Cannot assign to method `_run` [method-assign]
+ ERROR tests/test_cronjob.py:170:9-22: Cannot assign to method `_run` [method-assign]
+ ERROR tests/test_cronjob.py:238:9-22: Cannot assign to method `_run` [method-assign]
+ ERROR tests/test_messagequeue.py:315:9-36: Cannot assign to method `_connect_no_keepalive` [method-assign]
+ ERROR tests/test_messagequeue.py:316:9-37: Cannot assign to method `_connect_and_keepalive` [method-assign]
+ ERROR tests/test_psql.py:102:9-25: Cannot assign to method `_execute` [method-assign]

mitmproxy (https://github.com/mitmproxy/mitmproxy)
+ ERROR docs/src/examples/contrib/ntlm_upstream_proxy.py:150:9-42: Cannot assign to method `start_handshake` [method-assign]
+ ERROR docs/src/examples/contrib/ntlm_upstream_proxy.py:151:9-49: Cannot assign to method `receive_handshake_data` [method-assign]
+ ERROR examples/contrib/ntlm_upstream_proxy.py:150:9-42: Cannot assign to method `start_handshake` [method-assign]
+ ERROR examples/contrib/ntlm_upstream_proxy.py:151:9-49: Cannot assign to method `receive_handshake_data` [method-assign]
- ERROR mitmproxy/proxy/layer.py:312:58-59: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR mitmproxy/proxy/layer.py:313:59-60: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR mitmproxy/proxy/layers/http/_http2.py:333:41-42: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR mitmproxy/proxy/layers/http/_http3.py:200:45-46: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR mitmproxy/proxy/layers/quic/_raw_layers.py:102:62-63: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR mitmproxy/proxy/layers/quic/_stream_layers.py:520:73-74: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR mitmproxy/proxy/layers/quic/_stream_layers.py:521:75-76: Unused `# type: ignore` comment [unused-type-ignore]
+ ERROR test/mitmproxy/proxy/test_layer.py:43:17-27: Cannot assign to method `state` [method-assign]

steam.py (https://github.com/Gobot1234/steam.py)
+ ERROR steam/_const.py:195:5-15: Cannot assign to method `__eq__` [method-assign]
+ ERROR steam/_const.py:196:5-17: Cannot assign to method `__hash__` [method-assign]
+ ERROR steam/protobufs/msg.py:131:13-26: Cannot assign to method `__bytes__` [method-assign]

rotki (https://github.com/rotki/rotki)
+ ERROR rotkehlchen/tests/banks/test_qonto.py:157:5-20: Cannot assign to method `route` [method-assign]
- ERROR rotkehlchen/tests/exchanges/test_bitfinex.py:275:51-52: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR rotkehlchen/tests/exchanges/test_bitfinex.py:601:51-52: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR rotkehlchen/tests/exchanges/test_bitfinex.py:1188:51-52: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR rotkehlchen/tests/exchanges/test_bitfinex.py:1480:51-52: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR rotkehlchen/tests/exchanges/test_bitfinex.py:1721:51-52: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR rotkehlchen/tests/fixtures/accounting.py:472:73-74: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR rotkehlchen/tests/fixtures/accounting.py:473:85-86: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR rotkehlchen/tests/fixtures/accounting.py:587:73-74: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR rotkehlchen/tests/fixtures/accounting.py:588:85-86: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR rotkehlchen/tests/fixtures/accounting.py:589:105-106: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR rotkehlchen/tests/fixtures/accounting.py:590:117-118: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR rotkehlchen/tests/fixtures/accounting.py:595:83-84: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR rotkehlchen/tests/unit/test_lido_csm_metrics.py:55:54-55: Unused `# type: ignore` comment [unused-type-ignore]
+ ERROR rotkehlchen/tests/unit/test_tokens.py:166:5-39: Cannot assign to method `find_main_currency_prices` [method-assign]

flake8 (https://github.com/pycqa/flake8)
+ ERROR tests/integration/test_checker.py:122:5-37: Cannot assign to method `build_ast` [method-assign]
+ ERROR tests/integration/test_checker.py:126:5-24: Cannot assign to method `report` [method-assign]

pytest (https://github.com/pytest-dev/pytest)
- ERROR testing/io/test_terminalwriter.py:174:36-37: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR testing/test_terminal.py:3454:35-36: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/_pytest/junitxml.py:266:37-38: Unused `# type: ignore` comment [unused-type-ignore]

pyjwt (https://github.com/jpadilla/pyjwt)
- ERROR jwt/jwks_client.py:144:53-54: Unused `# type: ignore` comment [unused-type-ignore]

jax (https://github.com/google/jax)
+ ERROR jax/_src/ad_checkpoint.py:574:1-13: Cannot assign to method `bind` [method-assign]
+ ERROR jax/_src/ad_checkpoint.py:886:1-16: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/ad_checkpoint.py:896:1-17: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/compute_on.py:401:1-22: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/core.py:742:5-14: Cannot assign to method `impl` [method-assign]
+ ERROR jax/_src/core.py:746:5-23: Cannot assign to method `abstract_eval` [method-assign]
+ ERROR jax/_src/core.py:750:5-23: Cannot assign to method `abstract_eval` [method-assign]
+ ERROR jax/_src/core.py:754:5-23: Cannot assign to method `abstract_eval` [method-assign]
+ ERROR jax/_src/core.py:758:5-25: Cannot assign to method `bind_with_trace` [method-assign]
+ ERROR jax/_src/core.py:2940:1-14: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/core.py:2946:1-15: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/core.py:2993:1-20: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/core.py:3001:1-21: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/core.py:3064:1-17: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/core.py:3070:1-18: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/core.py:3084:1-28: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/core.py:3085:1-29: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/custom_batching.py:358:1-23: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/custom_derivatives.py:1938:1-20: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/custom_derivatives.py:1939:1-21: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/hijax.py:361:1-28: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/hijax.py:387:1-29: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/hijax.py:473:1-39: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/hijax.py:555:1-40: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/interpreters/partial_eval.py:2428:1-22: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/lax/control_flow/conditionals.py:1045:1-15: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/lax/control_flow/conditionals.py:1060:1-16: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/lax/control_flow/loops.py:1573:1-15: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/lax/control_flow/loops.py:1603:1-16: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/lax/control_flow/loops.py:2461:1-16: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/lax/control_flow/loops.py:2486:1-17: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/lax/eval_jaxpr.py:124:3-16: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/lax/lax.py:2060:1-21: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/pallas/mosaic/pipeline.py:2424:1-24: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/pallas/mosaic/pipeline.py:2672:1-24: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/pallas/mosaic/pipeline.py:2710:1-25: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/pallas/mosaic/primitives.py:319:1-20: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/pallas/mosaic/primitives.py:344:1-21: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/pallas/mosaic/primitives.py:571:1-19: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/pallas/mosaic/primitives.py:597:1-20: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/pallas/mpmd.py:495:1-19: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/pallas/mpmd.py:558:1-20: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/pallas/pallas_call.py:144:1-22: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/pallas/pallas_call.py:240:1-23: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/pallas/primitives.py:668:1-21: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/pallas/primitives.py:675:1-22: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/pjit.py:883:1-14: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/pjit.py:896:1-15: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/shard_map.py:745:1-20: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/shard_map.py:779:1-21: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/state/discharge.py:776:1-20: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/state/discharge.py:789:1-21: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/state/primitives.py:78:1-14: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/state/primitives.py:87:1-15: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/state/primitives.py:185:1-15: Cannot assign to method `is_high` [method-assign]
+ ERROR jax/_src/state/primitives.py:199:1-16: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/_src/xla_metadata.py:478:1-29: Cannot assign to method `to_lojax` [method-assign]
+ ERROR jax/experimental/fused.py:165:1-17: Cannot assign to method `to_lojax` [method-assign]

spark (https://github.com/apache/spark)
+ ERROR python/pyspark/sql/tests/test_udf_transpile_unit.py:1796:9-26: Cannot assign to method `__call__` [method-assign]

prefect (https://github.com/PrefectHQ/prefect)
+ ERROR src/prefect/_internal/compatibility/deprecated.py:162:9-21: Cannot assign to method `__init__` [method-assign]

cwltool (https://github.com/common-workflow-language/cwltool)
+ ERROR cwltool/argparser.py:58:5-43: Cannot assign to method `group_name_formatter` [method-assign]

alerta (https://github.com/alerta/alerta)
- ERROR alerta/app.py:58:48-49: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR alerta/models/key.py:32:46-47: Unused `# type: ignore` comment [unused-type-ignore]
+ ERROR tests/plugins/test_reject.py:27:5-22: Cannot assign to method `get_config` [method-assign]

urllib3 (https://github.com/urllib3/urllib3)
- ERROR test/test_http2_connection.py:93:61-62: Unused `# type: ignore` comment [unused-type-ignore]

scikit-learn (https://github.com/scikit-learn/scikit-learn)
+ ERROR sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py:886:5-22: Cannot assign to method `_raw_predict` [method-assign]
+ ERROR sklearn/ensemble/_hist_gradient_boosting/tests/test_gradient_boosting.py:912:5-22: Cannot assign to method `_raw_predict` [method-assign]
+ ERROR sklearn/feature_extraction/tests/test_text.py:618:5-18: Cannot assign to method `set_params` [method-assign]
+ ERROR sklearn/tests/test_metadata_routing.py:1189:5-22: Cannot assign to method `set_fit_request` [method-assign]
+ ERROR sklearn/utils/_mocking.py:349:1-35: Cannot assign to method `set_fit_request` [method-assign]

setuptools (https://github.com/pypa/setuptools)
+ ERROR setuptools/_distutils/_dataclass.py:52:9-21: Cannot assign to method `__init__` [method-assign]
+ ERROR setuptools/_distutils/compilers/C/tests/test_unix.py:385:9-31: Cannot assign to method `_library_root` [method-assign]
+ ERROR setuptools/_vendor/backports/tarfile/__init__.py:586:9-18: Cannot assign to method `read` [method-assign]
+ ERROR setuptools/_vendor/importlib_metadata/__init__.py:844:9-22: Cannot assign to method `joinpath` [method-assign]
- ERROR setuptools/command/build_ext.py:247:77-78: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR setuptools/command/setopt.py:41:53-54: Unused `# type: ignore` comment [unused-type-ignore]
+ ERROR setuptools/config/expand.py:372:5-23: Cannot assign to method `optionxform` [method-assign]
+ ERROR setuptools/dist.py:584:9-27: Cannot assign to method `optionxform` [method-assign]

pwndbg (https://github.com/pwndbg/pwndbg)
+ ERROR pwndbg/dbg_mod/gdb/__init__.py:575:13-28: Cannot assign to method `stop` [method-assign]
+ ERROR pwndbg/dbg_mod/gdb/__init__.py:585:13-28: Cannot assign to method `stop` [method-assign]
+ ERROR pwndbg/dbg_mod/gdb/__init__.py:609:13-28: Cannot assign to method `stop` [method-assign]

comtypes (https://github.com/enthought/comtypes)
- ERROR comtypes/client/__init__.py:29:80-81: Unused `# type: ignore` comment [unused-type-ignore]
+ ERROR comtypes/logutil.py:49:5-23: Cannot assign to method `optionxform` [method-assign]

scikit-build-core (https://github.com/scikit-build/scikit-build-core)
- ERROR tests/test_editable_redirect.py:376:36-37: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR tests/test_editable_redirect.py:760:36-37: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/scikit_build_core/setuptools/build_cmake.py:914:80-81: Unused `# type: ignore` comment [unused-type-ignore]

apprise (https://github.com/caronc/apprise)
+ ERROR apprise/plugins/base.py:453:13-24: Cannot assign to method `__len__` [method-assign]
+ ERROR tests/test_plugin_bark.py:659:5-30: Cannot assign to method `_encrypt_payload` [method-assign]
+ ERROR tests/test_plugin_matrix.py:2641:5-15: Cannot assign to method `_fetch` [method-assign]
+ ERROR tests/test_plugin_matrix.py:7561:5-15: Cannot assign to method `_fetch` [method-assign]
+ ERROR tests/test_plugin_rocket_chat.py:425:5-14: Cannot assign to method `login` [method-assign]
+ ERROR tests/test_retry_wait.py:947:13-24: Cannot assign to method `send` [method-assign]
+ ERROR tests/test_utils_socket.py:391:5-18: Cannot assign to method `connect` [method-assign]
+ ERROR tests/test_utils_socket.py:445:5-19: Cannot assign to method `recv` [method-assign]
+ ERROR tests/test_utils_socket.py:498:5-14: Cannot assign to method `send` [method-assign]
+ ERROR tests/test_utils_socket.py:600:5-15: Cannot assign to method `bind` [method-assign]
+ ERROR tests/test_utils_socket.py:612:5-21: Cannot assign to method `settimeout` [method-assign]
+ ERROR tests/test_utils_socket.py:759:5-17: Cannot assign to method `send` [method-assign]
+ ERROR tests/test_utils_socket.py:783:5-18: Cannot assign to method `send` [method-assign]
+ ERROR tests/test_utils_socket.py:786:5-19: Cannot assign to method `send` [method-assign]
+ ERROR tests/test_utils_socket.py:810:5-18: Cannot assign to method `recv` [method-assign]
+ ERROR tests/test_utils_socket.py:813:5-19: Cannot assign to method `recv` [method-assign]
+ ERROR tests/test_utils_socket.py:847:5-14: Cannot assign to method `recv` [method-assign]
+ ERROR tests/test_utils_socket.py:867:5-18: Cannot assign to method `recv` [method-assign]
+ ERROR tests/test_utils_socket.py:869:5-19: Cannot assign to method `recv` [method-assign]
+ ERROR tests/test_utils_socket.py:915:5-14: Cannot assign to method `recv` [method-assign]
+ ERROR tests/test_utils_socket.py:986:5-14: Cannot assign to method `recv` [method-assign]
+ ERROR tests/test_utils_socket.py:998:5-14: Cannot assign to method `recv` [method-assign]
+ ERROR tests/test_utils_socket.py:1010:5-14: Cannot assign to method `recv` [method-assign]
+ ERROR tests/test_utils_socket.py:1023:5-18: Cannot assign to method `recv` [method-assign]
+ ERROR tests/test_utils_socket.py:1027:5-19: Cannot assign to method `recv` [method-assign]
+ ERROR tests/test_utils_socket.py:1049:5-18: Cannot assign to method `recv` [method-assign]
+ ERROR tests/test_utils_socket.py:1057:5-19: Cannot assign to method `recv` [method-assign]

schemathesis (https://github.com/schemathesis/schemathesis)
- ERROR src/schemathesis/schemas.py:100:53-54: Unused `# type: ignore` comment [unused-type-ignore]

manticore (https://github.com/trailofbits/manticore)
+ ERROR manticore/core/manticore.py:1148:13-27: Cannot assign to method `subscribe` [method-assign]

cibuildwheel (https://github.com/pypa/cibuildwheel)
+ ERROR cibuildwheel/resources/ios-support/_cross_venv.py:90:29-52: Cannot assign to method `exec_module` [method-assign]

streamlit (https://github.com/streamlit/streamlit)
- ERROR lib/streamlit/runtime/caching/cache_data_api.py:432:44-45: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR lib/streamlit/runtime/caching/cache_resource_api.py:354:83-84: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR lib/streamlit/runtime/scriptrunner_utils/script_run_context.py:438:50-51: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR lib/tests/exception_capturing_thread.py:101:42-43: Unused `# type: ignore` comment [unused-type-ignore]
+ ERROR lib/tests/streamlit/components/v2/test_manifest_scanner.py:267:5-27: Cannot assign to method `__str__` [method-assign]
+ ERROR lib/tests/streamlit/components/v2/test_manifest_scanner.py:788:5-22: Cannot assign to method `__str__` [method-assign]
+ ERROR lib/tests/streamlit/components/v2/test_manifest_scanner.py:930:9-26: Cannot assign to method `__str__` [method-assign]
+ ERROR lib/tests/streamlit/runtime/runtime_test.py:590:9-37: Cannot assign to method `write_forward_msg` [method-assign]
+ ERROR lib/tests/streamlit/runtime/scriptrunner/script_runner_test.py:248:9-33: Cannot assign to method `_run_script` [method-assign]
+ ERROR lib/tests/streamlit/web/server/starlette/starlette_app_test.py:362:5-18: Cannot assign to method `start` [method-assign]

hydra-zen (https://github.com/mit-ll-responsible-ai/hydra-zen)
+ ERROR src/hydra_zen/third_party/beartype.py:125:9-21: Cannot assign to method `__init__` [method-assign]

ibis (https://github.com/ibis-project/ibis)
+ ERROR ibis/backends/singlestoredb/tests/test_client.py:327:5-23: Cannot assign to method `do_connect` [method-assign]
+ ERROR ibis/backends/singlestoredb/tests/test_client.py:347:9-27: Cannot assign to method `do_connect` [method-assign]
+ ERROR ibis/common/bases.py:119:9-30: Cannot assign to method `__init_subclass__` [method-assign]

zulip (https://github.com/zulip/zulip)
- ERROR zerver/tests/test_auth_backends.py:476:54-55: Unused `# type: ignore` comment [unused-type-ignore]

bandersnatch (https://github.com/pypa/bandersnatch)
- ERROR src/bandersnatch/tests/test_master.py:27:58-59: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_master.py:38:58-59: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_master.py:55:58-59: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_master.py:73:58-59: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_master.py:127:58-59: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_master.py:144:58-59: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_master.py:167:58-59: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_master.py:191:58-59: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_mirror.py:238:67-68: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_mirror.py:317:75-76: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_mirror.py:337:75-76: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_mirror.py:373:75-76: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_mirror.py:421:75-76: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_mirror.py:446:62-63: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_mirror.py:481:75-76: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_mirror.py:520:75-76: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_mirror.py:557:75-76: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_mirror.py:578:71-72: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_mirror.py:1221:63-64: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_package.py:46:69-70: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_package.py:60:47-48: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_package.py:74:72-73: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/bandersnatch/tests/test_sync.py:17:70-71: Unused `# type: ignore` comment [unused-type-ignore]

zope.interface (https://github.com/zopefoundation/zope.interface)
+ ERROR src/zope/interface/registry.py:552:9-22: Cannot assign to method `changed` [method-assign]
+ ERROR src/zope/interface/tests/test_adapter.py:343:9-33: Cannot assign to method `_addValueToLeaf` [method-assign]
+ ERROR src/zope/interface/tests/test_adapter.py:887:9-33: Cannot assign to method `_addValueToLeaf` [method-assign]
+ ERROR src/zope/interface/tests/test_ro.py:481:9-18: Cannot assign to method `_merge` [method-assign]

pywin32 (https://github.com/mhammond/pywin32)
- ERROR pythonwin/pywin/framework/intpyapp.py:31:60-61: Unused `# type: ignore` comment [unused-type-ignore]

dragonchain (https://github.com/dragonchain/dragonchain)
+ ERROR dragonchain/job_processor/contract_job_utest.py:263:13-42: Cannot assign to method `set_state` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:264:13-37: Cannot assign to method `save` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:274:9-48: Cannot assign to method `docker_login_if_necessary` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:280:9-33: Cannot assign to method `pull_image` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:281:9-40: Cannot assign to method `create_dockerfile` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:307:9-38: Cannot assign to method `set_state` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:308:9-33: Cannot assign to method `save` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:330:9-38: Cannot assign to method `set_state` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:331:9-33: Cannot assign to method `save` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:356:9-38: Cannot assign to method `set_state` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:357:9-33: Cannot assign to method `save` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:375:9-38: Cannot assign to method `set_state` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:376:9-33: Cannot assign to method `save` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:416:9-38: Cannot assign to method `set_state` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:417:9-33: Cannot assign to method `save` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:435:9-33: Cannot assign to method `save` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:438:9-40: Cannot assign to method `create` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:453:9-40: Cannot assign to method `schedule_contract` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:454:9-43: Cannot assign to method `build_contract_image` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:455:9-41: Cannot assign to method `deploy_to_openfaas` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:456:9-46: Cannot assign to method `create_openfaas_secrets` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:458:9-33: Cannot assign to method `save` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:459:9-40: Cannot assign to method `populate_api_keys` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:465:9-41: Cannot assign to method `deploy_to_openfaas` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:466:9-40: Cannot assign to method `schedule_contract` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:468:9-33: Cannot assign to method `save` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:469:9-46: Cannot assign to method `create_openfaas_secrets` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:486:9-51: Cannot assign to method `create_dockerfile` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:487:9-57: Cannot assign to method `create_openfaas_secrets` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:488:9-55: Cannot assign to method `delete_contract_image` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:489:9-52: Cannot assign to method `deploy_to_openfaas` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:490:9-44: Cannot assign to method `pull_image` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:491:9-51: Cannot assign to method `schedule_contract` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:508:9-46: Cannot assign to method `delete_openfaas_secrets` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:509:9-47: Cannot assign to method `delete_openfaas_function` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:510:9-43: Cannot assign to method `delete_contract_data` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:511:9-44: Cannot assign to method `delete_contract_image` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:512:9-42: Cannot assign to method `unschedule_contract` [method-assign]
+ ERROR dragonchain/job_processor/contract_job_utest.py:513:9-33: Cannot assign to method `save` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:73:9-38: Cannot assign to method `get_current_block` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:78:9-38: Cannot assign to method `get_current_block` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:84:9-35: Cannot assign to method `_fetch_account` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:109:9-35: Cannot assign to method `_fetch_account` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:118:9-43: Cannot assign to method `_build_transaction_msg` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:119:9-37: Cannot assign to method `sign_transaction` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:122:9-35: Cannot assign to method `_call_node_api` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:123:9-35: Cannot assign to method `_call_node_rpc` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:131:9-35: Cannot assign to method `_call_node_rpc` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:140:9-35: Cannot assign to method `_call_node_api` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:149:9-35: Cannot assign to method `_call_node_api` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:156:9-35: Cannot assign to method `_call_node_api` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:164:9-35: Cannot assign to method `_call_node_api` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:170:9-38: Cannot assign to method `get_current_block` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:173:9-35: Cannot assign to method `_call_node_rpc` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:180:9-38: Cannot assign to method `get_current_block` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:183:9-35: Cannot assign to method `_call_node_rpc` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:192:9-35: Cannot assign to method `_call_node_rpc` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:322:9-35: Cannot assign to method `_call_node_api` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:331:9-35: Cannot assign to method `_call_node_api` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:338:9-35: Cannot assign to method `_call_node_rpc` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:339:9-35: Cannot assign to method `_call_node_api` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:347:9-35: Cannot assign to method `_call_node_rpc` [method-assign]
+ ERROR dragonchain/lib/dto/bnb_utest.py:349:9-35: Cannot assign to method `_call_node_api` [method-assign]
+ ERROR dragonchain/lib/dto/btc_utest.py:51:9-38: Cannot assign to method `get_current_block` [method-assign]
+ ERROR dragonchain/lib/dto/btc_utest.py:56:9-38: Cannot assign to method `get_current_block` [method-assign]
+ ERROR dragonchain/lib/dto/btc_utest.py:61:9-26: Cannot assign to method `_call` [method-assign]
+ ERROR dragonchain/lib/dto/btc_utest.py:62:9-37: Cannot assign to method `sign_transaction` [method-assign]
+ ERROR dragonchain/lib/dto/btc_utest.py:70:9-31: Cannot assign to method `_get_utxos` [method-assign]
+ ERROR dragonchain/lib/dto/btc_utest.py:77:9-26: Cannot assign to method `_call` [method-assign]
+ ERROR dragonchain/lib/dto/btc_utest.py:84:9-26: Cannot assign to method `_call` [method-assign]
+ ERROR dragonchain/lib/dto/btc_utest.py:90:9-47: Cannot assign to method `_calculate_transaction_fee` [method-assign]
+ ERROR dragonchain/lib/dto/btc_utest.py:101:9-26: Cannot assign to method `_call` [method-assign]
+ ERROR dragonchain/lib/dto/btc_utest.py:108:9-26: Cannot assign to method `_call` [method-assign]
+ ERROR dragonchain/lib/dto/btc_utest.py:114:9-26: Cannot assign to method `_call` [method-assign]
+ ERROR dragonchain/lib/dto/btc_utest.py:120:9-26: Cannot assign to method `_call` [method-assign]
+ ERROR dragonchain/lib/dto/btc_utest.py:125:9-26: Cannot assign to method `_call` [method-assign]
+ ERROR dragonchain/lib/dto/btc_utest.py:131:9-26: Cannot assign to method `_call` [method-assign]
+ ERROR dragonchain/lib/dto/btc_utest.py:138:9-26: Cannot assign to method `_call` [method-assign]
+ ERROR dragonchain/lib/dto/eth_utest.py:51:9-37: Cannot assign to method `sign_transaction` [method-assign]
+ ERROR dragonchain/lib/dto/eth_utest.py:72:9-38: Cannot assign to method `get_current_block` [method-assign]
+ ERROR dragonchain/lib/dto/eth_utest.py:77:9-38: Cannot assign to method `get_current_block` [method-assign]
+ ERROR dragonchain/lib/dto/eth_utest.py:88:9-47: Cannot assign to method `_calculate_transaction_fee` [method-assign]
+ ERROR dragonchain/lib/dto/eth_utest.py:115:9-38: Cannot assign to method `get_current_block` [method-assign]
+ ERROR dragonchain/lib/dto/eth_utest.py:123:9-38: Cannot assign to method `get_current_block` [method-assign]
+ ERROR dragonchain/lib/dto/eth_utest.py:131:9-38: Cannot assign to method `get_current_block` [method-assign]
+ ERROR dragonchain/scheduler/timing_event_utest.py:130:9-23: Cannot assign to method `exception` [method-assign]
+ ERROR dragonchain/transaction_processor/level_5_actions_utest.py:238:9-77: Cannot assign to method `publish_l5_hash_to_public_network` [method-assign]
+ ERROR dragonchain/transaction_processor/level_5_actions_utest.py:239:9-61: Cannot assign to method `get_current_block` [method-assign]
+ ERROR dragonchain/transaction_processor/level_5_actions_utest.py:466:9-57: Cannot assign to method `check_balance` [method-assign]
+ ERROR dragonchain/transaction_processor/level_5_actions_utest.py:467:9-72: Cannot assign to method `get_transaction_fee_estimate` [method-assign]
+ ERROR dragonchain/transaction_processor/level_5_actions_utest.py:481:9-57: Cannot assign to method `check_balance` [method-assign]
+ ERROR dragonchain/transaction_processor/level_5_actions_utest.py:482:9-72: Cannot assign to method `get_transaction_fee_estimate` [method-assign]
+ ERROR dragonchain/transaction_processor/level_5_actions_utest.py:493:9-72: Cannot assign to method `get_transaction_fee_estimate` [method-assign]
+ ERROR dragonchain/transaction_processor/level_5_actions_utest.py:507:9-72: Cannot assign to method `get_transaction_fee_estimate` [method-assign]
+ ERROR dragonchain/transaction_processor/level_5_actions_utest.py:519:9-72: Cannot assign to method `get_transaction_fee_estimate` [method-assign]

pandas (https://github.com/pandas-dev/pandas)
+ ERROR pandas/tests/io/test_common.py:399:9-24: Cannot assign to method `fileno` [method-assign]
+ ERROR pandas/tests/io/test_gcs.py:25:5-21: Cannot assign to method `close` [method-assign]

dd-trace-py (https://github.com/DataDog/dd-trace-py)
- ERROR ddtrace/_trace/tracer.py:1039:68-69: Unused `# type: ignore` comment [unused-type-ignore]
+ ERROR ddtrace/contrib/internal/httplib/patch.py:231:5-36: Cannot assign to method `__init__` [method-assign]
+ ERROR ddtrace/contrib/internal/httplib/patch.py:232:5-39: Cannot assign to method `getresponse` [method-assign]
+ ERROR ddtrace/contrib/internal/httplib/patch.py:233:5-35: Cannot assign to method `request` [method-assign]
+ ERROR ddtrace/contrib/internal/httplib/patch.py:234:5-38: Cannot assign to method `putrequest` [method-assign]
+ ERROR ddtrace/contrib/internal/httplib/patch.py:235:5-37: Cannot assign to method `putheader` [method-assign]
- ERROR ddtrace/internal/compat.py:100:48-49: Unused `# type: ignore` comment [unused-type-ignore]
+ ERROR ddtrace/internal/coverage/multiprocessing_coverage.py:221:5-49: Cannot assign to method `__init__` [method-assign]
+ ERROR ddtrace/internal/coverage/multiprocessing_coverage.py:222:5-46: Cannot assign to method `close` [method-assign]
+ ERROR ddtrace/internal/coverage/multiprocessing_coverage.py:223:5-45: Cannot assign to method `join` [method-assign]
+ ERROR ddtrace/internal/coverage/multiprocessing_coverage.py:224:5-45: Cannot assign to method `kill` [method-assign]
+ ERROR ddtrace/internal/coverage/multiprocessing_coverage.py:225:5-50: Cannot assign to method `terminate` [method-assign]
+ ERROR ddtrace/internal/coverage/threading_coverage.py:86:5-30: Cannot assign to method `__init__` [method-assign]
+ ERROR ddtrace/internal/coverage/threading_coverage.py:88:5-26: Cannot assign to method `join` [method-assign]
- ERROR ddtrace/internal/utils/time.py:95:42-43: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR ddtrace/internal/utils/time.py:106:43-44: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR ddtrace/internal/utils/time.py:120:42-43: Unused `# type: ignore` comment [unused-type-ignore]

meson (https://github.com/mesonbuild/meson)
+ ERROR unittests/failuretests.py:50:5-28: Cannot assign to method `_search` [method-assign]
+ ERROR unittests/failuretests.py:55:9-32: Cannot assign to method `_search` [method-assign]

mypy (https://github.com/python/mypy)
- ERROR mypyc/lib-rt/build_setup.py:69:36-37: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR mypyc/build.py:527:53-54: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR mypyc/build_setup.py:69:36-37: Unused `# type: ignore` comment [unused-type-ignore]

werkzeug (https://github.com/pallets/werkzeug)
+ ERROR tests/live_apps/run.py:35:5-38: Cannot assign to method `address_string` [method-assign]
+ ERROR src/werkzeug/middleware/shared_data.py:140:13-28: Cannot assign to method `is_allowed` [method-assign]

core (https://github.com/home-assistant/core)
- ERROR homeassistant/components/http/server.py:538:49-50: Unused `# type: ignore` comment [unused-type-ignore]
+ ERROR homeassistant/components/owntracks/__init__.py:276:9-23: Cannot assign to method `async_see` [method-assign]
- ERROR homeassistant/components/zeroconf/usage.py:34:53-54: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR homeassistant/helpers/aiohttp_client.py:310:38-39: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR homeassistant/helpers/httpx_client.py:128:32-33: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR homeassistant/runner.py:193:44-45: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR homeassistant/runner.py:199:28-29: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR homeassistant/util/frozen_dataclass_compat.py:131:32-33: Unused `# type: ignore` comment [unused-type-ignore]

trio (https://github.com/python-trio/trio)
- ERROR src/trio/_core/_tests/test_instrumentation.py:226:42-43: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/trio/_deprecate.py:171:57-58: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR src/trio/_tests/test_socket.py:942:65-66: Unused `# type: ignore` comment [unused-type-ignore]

jinja (https://github.com/pallets/jinja)
- ERROR src/jinja2/nodes.py:1199:48-49: Unused `# type: ignore` comment [unused-type-ignore]

xarray (https://github.com/pydata/xarray)
+ ERROR xarray/core/common.py:281:13-28: Cannot assign to method `__setattr__` [method-assign]

rich (https://github.com/Textualize/rich)
- ERROR rich/repr.py:94:35-36: Unused `# type: ignore` comment [unused-type-ignore]

typeshed-stats (https://github.com/AlexWaygood/typeshed-stats)
+ ERROR src/typeshed_stats/_cli.py:114:9-43: Cannot assign to method `group_name_formatter` [method-assign]

poetry (https://github.com/python-poetry/poetry)
- ERROR tests/puzzle/test_provider.py:1051:84-85: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR tests/puzzle/test_provider.py:1055:75-76: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR tests/puzzle/test_provider.py:1089:84-85: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR tests/repositories/test_cached_repository.py:67:84-85: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR tests/repositories/test_cached_repository.py:75:75-76: Unused `# type: ignore` comment [unused-type-ignore]

pydantic (https://github.com/pydantic/pydantic)
+ ERROR pydantic/_internal/_model_construction.py:234:21-40: Cannot assign to method `model_post_init` [method-assign]
+ ERROR pydantic/_internal/_model_construction.py:236:21-40: Cannot assign to method `model_post_init` [method-assign]

spack (https://github.com/spack/spack)
+ ERROR lib/spack/spack/main.py:343:9-22: Cannot assign to method `add_parser` [method-assign]
+ ERROR lib/spack/spack/test/conftest.py:391:5-44: Cannot assign to method `setattr` [method-assign]
+ ERROR lib/spack/spack/test/conftest.py:395:9-48: Cannot assign to method `setattr` [method-assign]
+ ERROR lib/spack/spack/test/conftest.py:2476:5-68: Cannot assign to method `default_libc` [method-assign]
+ ERROR lib/spack/spack/test/conftest.py:2479:5-68: Cannot assign to method `default_libc` [method-assign]
+ ERROR lib/spack/spack/test/install.py:145:5-28: Cannot assign to method `remove_prefix` [method-assign]
+ ERROR lib/spack/spack/test/install.py:150:5-28: Cannot assign to method `remove_prefix` [method-assign]
+ ERROR lib/spack/spack/test/views.py:64:5-32: Cannot assign to method `add_files_to_view` [method-assign]

discord.py (https://github.com/Rapptz/discord.py)
- ERROR discord/app_commands/commands.py:1859:31-32: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR discord/app_commands/tree.py:849:31-32: Unused `# type: ignore` comment [unused-type-ignore]
+ ERROR discord/enums.py:97:5-17: Cannot assign to method `__repr__` [method-assign]
+ ERROR discord/enums.py:98:5-16: Cannot assign to method `__str__` [method-assign]
+ ERROR discord/enums.py:100:9-19: Cannot assign to method `__le__` [method-assign]
+ ERROR discord/enums.py:101:9-19: Cannot assign to method `__ge__` [method-assign]
+ ERROR discord/enums.py:102:9-19: Cannot assign to method `__lt__` [method-assign]
+ ERROR discord/enums.py:103:9-19: Cannot assign to method `__gt__` [method-assign]
+ ERROR discord/ext/commands/help.py:309:9-25: Cannot assign to method `get_commands` [method-assign]
+ ERROR discord/ext/commands/help.py:310:9-26: Cannot assign to method `walk_commands` [method-assign]
+ ERROR discord/ext/tasks/__init__.py:305:9-20: Cannot assign to method `_error` [method-assign]
+ ERROR discord/file.py:106:9-22: Cannot assign to method `close` [method-assign]
+ ERROR discord/file.py:160:9-22: Cannot assign to method `close` [method-assign]
+ ERROR discord/gateway.py:424:13-20: Cannot assign to method `send` [method-assign]
+ ERROR discord/gateway.py:425:13-27: Cannot assign to method `log_receive` [method-assign]
- ERROR discord/gateway.py:879:32-33: Unused `# type: ignore` comment [unused-type-ignore]
+ ERROR discord/state.py:263:13-28: Cannot assign to method `store_user` [method-assign]
- ERROR discord/ui/action_row.py:164:62-63: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR discord/ui/container.py:152:65-66: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR discord/ui/view.py:274:65-66: Unused `# type: ignore` comment [unused-type-ignore]

porcupine (https://github.com/Akuli/porcupine)
- ERROR porcupine/plugins/langserver.py:702:79-80: Unused `# type: ignore` comment [unused-type-ignore]

scrapy (https://github.com/scrapy/scrapy)
- ERROR scrapy/commands/check.py:124:42-43: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR scrapy/commands/fetch.py:96:34-35: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR scrapy/core/downloader/handlers/http11.py:217:60-61: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR scrapy/core/downloader/handlers/http11.py:235:67-68: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR tests/test_command_shell.py:354:36-37: Unused `# type: ignore` comment [unused-type-ignore]
+ ERROR tests/test_command_shell.py:386:9-41: Cannot assign to method `open_spider_async` [method-assign]
- ERROR tests/test_crawler.py:1002:51-52: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR tests/test_crawler.py:1025:51-52: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR tests/test_downloadermiddleware_redirect.py:415:49-50: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR tests/test_downloadermiddleware_redirect.py:431:49-50: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR tests/test_downloadermiddleware_redirect.py:456:49-50: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR tests/test_downloadermiddleware_redirect_metarefresh.py:149:49-50: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR tests/test_downloadermiddleware_robotstxt.py:252:58-59: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR tests/test_engine.py:208:57-58: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR tests/test_extension_telnet.py:51:38-39: Unused `# type: ignore` comment [unused-type-ignore]

PyGithub (https://github.com/PyGithub/PyGithub)
- ERROR github/GithubRetry.py:208:72-73: Unused `# type: ignore` comment [unused-type-ignore]

optuna (https://github.com/optuna/optuna)
- ERROR tests/storages_tests/test_heartbeat.py:290:63-64: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR tests/study_tests/test_study.py:1708:69-70: Unused `# type: ignore` comment [unused-type-ignore]

graphql-core (https://github.com/graphql-python/graphql-core)
- ERROR tests/execution/incremental/test_incremental_executor.py:169:42-43: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR tests/execution/incremental/test_incremental_executor.py:196:52-53: Unused `# type: ignore` comment [unused-type-ignore]
- ERROR tests/execution/incremental/test_incremental_executor.py:223:42-43: Unused `# type: ignore` comment [unused-type-ignore]

schema_salad (https://github.com/common-workflow-language/schema_salad)
+ ERROR src/schema_salad/main.py:53:5-43: Cannot assign to method `group_name_formatter` [method-assign]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: implement method-assign from mypy

2 participants