Skip to content

Add consider-narrowing-parameter check (R1738) - #11236

Draft
Pierre-Sassoulas wants to merge 7 commits into
pylint-dev:mainfrom
Pierre-Sassoulas:consider-narrowing-parameter
Draft

Add consider-narrowing-parameter check (R1738)#11236
Pierre-Sassoulas wants to merge 7 commits into
pylint-dev:mainfrom
Pierre-Sassoulas:consider-narrowing-parameter

Conversation

@Pierre-Sassoulas

Copy link
Copy Markdown
Member

Type of Changes

Type
✨ New feature

Description

Emitted when a function or method parameter is only ever used to access a single attribute, meaning the function could accept that attribute's value directly (stamp coupling that could be data coupling).

The new ignored-function-names option excludes functions whose signature is imposed by a convention or a protocol (e.g. visitor callbacks).

Want to see the primer for this and what poeple think basically.

Emitted when a function or method parameter is only ever used to access
a single attribute, meaning the function could accept that attribute's
value directly (stamp coupling that could be data coupling).

The new ``ignored-function-names`` option excludes functions whose
signature is imposed by a convention or a protocol (e.g. visitor
callbacks). The message is disabled on our own code base for now: it
raises 86 legitimate suggestions that will be cleaned up separately.
@Pierre-Sassoulas Pierre-Sassoulas added the Enhancement ✨ Improvement to a component label Aug 8, 2026
@codecov

codecov Bot commented Aug 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.37%. Comparing base (7f0d9a7) to head (575bd39).
⚠️ Report is 79 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #11236      +/-   ##
==========================================
+ Coverage   96.35%   96.37%   +0.02%     
==========================================
  Files         178      178              
  Lines       19932    20068     +136     
==========================================
+ Hits        19205    19341     +136     
  Misses        727      727              
Files with missing lines Coverage Δ
pylint/checkers/refactoring/refactoring_checker.py 98.60% <100.00%> (+0.18%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

This comment has been minimized.

The primer showed hits on 'def fix(self=self)' closure captures and on
module-level functions destined to be attached to a class: these follow
the method convention even outside a class body. Also document
'ignored-function-names' as the right knob for pytest test suites, where
parameters are fixtures injected by name (38% of primer hits were in
test files).
Two changes to cut false positives found by the primer:

- A parameter whose attribute is accessed only once is no longer
  reported: short adapters implementing a duck-typed interface (like
  'filter(record)' for the logging framework in astropy) look exactly
  like a narrowing candidate but their signature is imposed.

- A function referenced anywhere in its module without being called
  (passed as a callback, registered in a container...) is no longer
  reported: its signature belongs to whoever ends up calling it.

Self-hits on our own code base drop from 86 to 27, and 5 of the 8
functional test files touched by the initial commit no longer need
their disable.
@github-actions

This comment has been minimized.

… hit

Reviewing each of the 246 primer messages one by one surfaced three hits
where applying the suggestion would change behavior, each with its own
mechanism. Three new guards:

- an access inside a 'try' whose handler would catch AttributeError
  cannot be hoisted past the guard (pytest's '_getcrashline');
- a method overridden by a subclass of the same module cannot be
  narrowed without breaking the polymorphic call sites (ansible's
  '_check_results');
- when an exit point precedes every access, narrowing would make a
  side-effectful property access unconditional at the call site
  (music21's 'setEditorial' and its lazily-created '.editorial').

The check is also restricted to private and nested functions by default
- the review showed public hits are dominated by deliberate design
(method-family symmetry, domain objects) and framework hooks. The new
'suggest-narrowing-public-parameters' option restores the wider scope.
Bare 'except:', tuple handlers, dotted 'builtins.AttributeError' and the
3.11+ 'except*' form all guard an attribute access the same way.
@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🤖 Effect of this PR on checked open source code: 🤖

Effect on astropy:

New messages:

Details
  1. consider-narrowing-parameter:
    Parameter 'col' is only used as 'col.info'; consider accepting the attribute value directly
    https://github.com/astropy/astropy/blob/1fb40bc1f22f176254ef583065aa155f53f3b414/astropy/io/fits/fitstime.py#L309
  2. consider-narrowing-parameter:
    Parameter 'table' is only used as 'table.meta'; consider accepting the attribute value directly
    https://github.com/astropy/astropy/blob/1fb40bc1f22f176254ef583065aa155f53f3b414/astropy/io/fits/fitstime.py#L341
  3. consider-narrowing-parameter:
    Parameter 'format' is only used as 'format.dtype'; consider accepting the attribute value directly
    https://github.com/astropy/astropy/blob/1fb40bc1f22f176254ef583065aa155f53f3b414/astropy/io/fits/column.py#L2216
  4. consider-narrowing-parameter:
    Parameter 'recformat' is only used as 'recformat.repeat'; consider accepting the attribute value directly
    https://github.com/astropy/astropy/blob/1fb40bc1f22f176254ef583065aa155f53f3b414/astropy/io/fits/fitsrec.py#L801
  5. consider-narrowing-parameter:
    Parameter 'new_tbhdu' is only used as 'new_tbhdu.columns'; consider accepting the attribute value directly
    https://github.com/astropy/astropy/blob/1fb40bc1f22f176254ef583065aa155f53f3b414/astropy/io/fits/tests/test_table.py#L113
  6. consider-narrowing-parameter:
    Parameter 'tbhdu' is only used as 'tbhdu.columns'; consider accepting the attribute value directly
    https://github.com/astropy/astropy/blob/1fb40bc1f22f176254ef583065aa155f53f3b414/astropy/io/fits/tests/test_table.py#L113
  7. consider-narrowing-parameter:
    Parameter 'fromcoord' is only used as 'fromcoord.data'; consider accepting the attribute value directly
    https://github.com/astropy/astropy/blob/1fb40bc1f22f176254ef583065aa155f53f3b414/astropy/coordinates/transformations/affine.py#L41
  8. consider-narrowing-parameter:
    Parameter 'c' is only used as 'c.data'; consider accepting the attribute value directly
    https://github.com/astropy/astropy/blob/1fb40bc1f22f176254ef583065aa155f53f3b414/astropy/coordinates/builtin_frames/galactocentric.py#L565
  9. consider-narrowing-parameter:
    Parameter 'dtype' is only used as 'dtype.name'; consider accepting the attribute value directly
    https://github.com/astropy/astropy/blob/1fb40bc1f22f176254ef583065aa155f53f3b414/astropy/table/_dataframes.py#L38
  10. consider-narrowing-parameter:
    Parameter 'section' is only used as 'section.name'; consider accepting the attribute value directly
    https://github.com/astropy/astropy/blob/1fb40bc1f22f176254ef583065aa155f53f3b414/astropy/extern/configobj/configobj.py#L306
  11. consider-narrowing-parameter:
    Parameter 'a' is only used as 'a.bases'; consider accepting the attribute value directly
    https://github.com/astropy/astropy/blob/1fb40bc1f22f176254ef583065aa155f53f3b414/astropy/units/core.py#L860
  12. consider-narrowing-parameter:
    Parameter 'b' is only used as 'b.bases'; consider accepting the attribute value directly
    https://github.com/astropy/astropy/blob/1fb40bc1f22f176254ef583065aa155f53f3b414/astropy/units/core.py#L860
  13. consider-narrowing-parameter:
    Parameter 'dtype' is only used as 'dtype.fields'; consider accepting the attribute value directly
    https://github.com/astropy/astropy/blob/1fb40bc1f22f176254ef583065aa155f53f3b414/astropy/units/quantity_helper/function_helpers.py#L1527

Effect on music21:

New messages:

Details
  1. consider-narrowing-parameter:
    Parameter 'pInner' is only used as 'pInner.diatonicNoteNum'; consider accepting the attribute value directly
    https://github.com/cuthbertLab/music21/blob/65fe74f6584bdeed8421dc57b0452b4d364e4159/music21/clef.py#L960
  2. consider-narrowing-parameter:
    Parameter 'streamObj' is only used as 'streamObj.notes'; consider accepting the attribute value directly
    https://github.com/cuthbertLab/music21/blob/65fe74f6584bdeed8421dc57b0452b4d364e4159/music21/analysis/discrete.py#L344
  3. consider-narrowing-parameter:
    Parameter 'mf_inner' is only used as 'mf_inner.tracks'; consider accepting the attribute value directly
    https://github.com/cuthbertLab/music21/blob/65fe74f6584bdeed8421dc57b0452b4d364e4159/music21/midi/tests.py#L1304
  4. consider-narrowing-parameter:
    Parameter 'inner_self' is only used as 'inner_self.currentMeasure'; consider accepting the attribute value directly
    https://github.com/cuthbertLab/music21/blob/65fe74f6584bdeed8421dc57b0452b4d364e4159/music21/noteworthy/translate.py#L538
  5. consider-narrowing-parameter:
    Parameter 'mf_inner' is only used as 'mf_inner.tracks'; consider accepting the attribute value directly
    https://github.com/cuthbertLab/music21/blob/65fe74f6584bdeed8421dc57b0452b4d364e4159/music21/stream/tests.py#L3775
  6. consider-narrowing-parameter:
    Parameter 'n' is only used as 'n.lyrics'; consider accepting the attribute value directly
    https://github.com/cuthbertLab/music21/blob/65fe74f6584bdeed8421dc57b0452b4d364e4159/music21/stream/base.py#L11713

Effect on pygame:

New messages:

Details
  1. consider-narrowing-parameter:
    Parameter 'end' is only used as 'end.y'; consider accepting the attribute value directly
    https://github.com/pygame/pygame/blob/85fda3f719d437cf27106afae8c890e6b88ba5f5/src_py/draw_py.py#L301
  2. consider-narrowing-parameter:
    Parameter 'end' is only used as 'end.x'; consider accepting the attribute value directly
    https://github.com/pygame/pygame/blob/85fda3f719d437cf27106afae8c890e6b88ba5f5/src_py/draw_py.py#L321

Effect on ansible:

New messages:

Details
  1. consider-narrowing-parameter:
    Parameter 'result' is only used as 'result.result'; consider accepting the attribute value directly
    https://github.com/ansible/ansible/blob/3f10c2c0a910b15675534891ca567dcde355ad8e/lib/ansible/plugins/callback/__init__.py#L261
  2. consider-narrowing-parameter:
    Parameter 'result' is only used as 'result.result'; consider accepting the attribute value directly
    https://github.com/ansible/ansible/blob/3f10c2c0a910b15675534891ca567dcde355ad8e/lib/ansible/plugins/callback/__init__.py#L394
  3. consider-narrowing-parameter:
    Parameter 'path_stat' is only used as 'path_stat.st_mode'; consider accepting the attribute value directly
    https://github.com/ansible/ansible/blob/3f10c2c0a910b15675534891ca567dcde355ad8e/lib/ansible/module_utils/basic.py#L1062
  4. consider-narrowing-parameter:
    Parameter 'node' is only used as 'node.start_mark'; consider accepting the attribute value directly
    https://github.com/ansible/ansible/blob/3f10c2c0a910b15675534891ca567dcde355ad8e/lib/ansible/_internal/_yaml/_constructor.py#L162
  5. consider-narrowing-parameter:
    Parameter 'templar' is only used as 'templar._engine'; consider accepting the attribute value directly
    https://github.com/ansible/ansible/blob/3f10c2c0a910b15675534891ca567dcde355ad8e/lib/ansible/executor/module_common.py#L324
  6. consider-narrowing-parameter:
    Parameter 'candidate' is only used as 'candidate.fqcn'; consider accepting the attribute value directly
    https://github.com/ansible/ansible/blob/3f10c2c0a910b15675534891ca567dcde355ad8e/lib/ansible/galaxy/dependency_resolution/reporters.py#L62

Effect on django:

New messages:

Details
  1. consider-narrowing-parameter:
    Parameter 'cl' is only used as 'cl.list_display_links'; consider accepting the attribute value directly
    https://github.com/django/django/blob/ad5ea292748246b2f07f3e379a250985c1ebcba5/django/contrib/admin/templatetags/admin_list.py#L208
  2. consider-narrowing-parameter:
    Parameter 'connection' is only used as 'connection.features'; consider accepting the attribute value directly
    https://github.com/django/django/blob/ad5ea292748246b2f07f3e379a250985c1ebcba5/django/contrib/gis/db/models/fields.py#L398
  3. consider-narrowing-parameter:
    Parameter 'model' is only used as 'model._meta'; consider accepting the attribute value directly
    https://github.com/django/django/blob/ad5ea292748246b2f07f3e379a250985c1ebcba5/django/forms/models.py#L1227
  4. consider-narrowing-parameter:
    Parameter 'other' is only used as 'other.query'; consider accepting the attribute value directly
    https://github.com/django/django/blob/ad5ea292748246b2f07f3e379a250985c1ebcba5/django/db/models/query.py#L2249
  5. consider-narrowing-parameter:
    Parameter 'on_delete' is only used as 'on_delete.name'; consider accepting the attribute value directly
    https://github.com/django/django/blob/ad5ea292748246b2f07f3e379a250985c1ebcba5/django/db/models/fields/related.py#L1060
  6. consider-narrowing-parameter:
    Parameter 'model' is only used as 'model._meta'; consider accepting the attribute value directly
    https://github.com/django/django/blob/ad5ea292748246b2f07f3e379a250985c1ebcba5/django/db/backends/base/schema.py#L1541
  7. consider-narrowing-parameter:
    Parameter 'field' is only used as 'field.base_field'; consider accepting the attribute value directly
    https://github.com/django/django/blob/ad5ea292748246b2f07f3e379a250985c1ebcba5/django/db/backends/postgresql/schema.py#L76

Effect on pandas:

New messages:

Details
  1. consider-narrowing-parameter:
    Parameter 'orig_values' is only used as 'orig_values.dtype'; consider accepting the attribute value directly
    https://github.com/pandas-dev/pandas/blob/b77f5fc2227d91b09f90bebd905cc6ff3ae3c1f4/pandas/core/nanops.py#L651
  2. consider-narrowing-parameter:
    Parameter 'arr' is only used as 'arr.dtype'; consider accepting the attribute value directly
    https://github.com/pandas-dev/pandas/blob/b77f5fc2227d91b09f90bebd905cc6ff3ae3c1f4/pandas/core/strings/accessor.py#L4804
  3. consider-narrowing-parameter:
    Parameter 'regex' is only used as 'regex.groupindex'; consider accepting the attribute value directly
    https://github.com/pandas-dev/pandas/blob/b77f5fc2227d91b09f90bebd905cc6ff3ae3c1f4/pandas/core/strings/accessor.py#L4815
  4. consider-narrowing-parameter:
    Parameter 'arr' is only used as 'arr.dtype'; consider accepting the attribute value directly
    https://github.com/pandas-dev/pandas/blob/b77f5fc2227d91b09f90bebd905cc6ff3ae3c1f4/pandas/core/array_algos/take.py#L565
  5. consider-narrowing-parameter:
    Parameter 'values' is only used as 'values.shape'; consider accepting the attribute value directly
    https://github.com/pandas-dev/pandas/blob/b77f5fc2227d91b09f90bebd905cc6ff3ae3c1f4/pandas/core/internals/construction.py#L358
  6. consider-narrowing-parameter:
    Parameter 'left' is only used as 'left.dtype'; consider accepting the attribute value directly
    https://github.com/pandas-dev/pandas/blob/b77f5fc2227d91b09f90bebd905cc6ff3ae3c1f4/pandas/core/reshape/merge.py#L2490
  7. consider-narrowing-parameter:
    Parameter 'right' is only used as 'right.dtype'; consider accepting the attribute value directly
    https://github.com/pandas-dev/pandas/blob/b77f5fc2227d91b09f90bebd905cc6ff3ae3c1f4/pandas/core/reshape/merge.py#L2490
  8. consider-narrowing-parameter:
    Parameter 'df' is only used as 'df.columns'; consider accepting the attribute value directly
    https://github.com/pandas-dev/pandas/blob/b77f5fc2227d91b09f90bebd905cc6ff3ae3c1f4/pandas/core/reshape/melt.py#L623
  9. consider-narrowing-parameter:
    Parameter 'columns' is only used as 'columns.names'; consider accepting the attribute value directly
    https://github.com/pandas-dev/pandas/blob/b77f5fc2227d91b09f90bebd905cc6ff3ae3c1f4/pandas/core/reshape/reshape.py#L805
  10. consider-narrowing-parameter:
    Parameter 'values' is only used as 'values.shape'; consider accepting the attribute value directly
    https://github.com/pandas-dev/pandas/blob/b77f5fc2227d91b09f90bebd905cc6ff3ae3c1f4/pandas/core/groupby/ops.py#L263
  11. consider-narrowing-parameter:
    Parameter 'term' is only used as 'term.value'; consider accepting the attribute value directly
    https://github.com/pandas-dev/pandas/blob/b77f5fc2227d91b09f90bebd905cc6ff3ae3c1f4/pandas/core/computation/align.py#L43
  12. consider-narrowing-parameter:
    Parameter 'other' is only used as 'other.names'; consider accepting the attribute value directly
    https://github.com/pandas-dev/pandas/blob/b77f5fc2227d91b09f90bebd905cc6ff3ae3c1f4/pandas/core/indexes/multi.py#L4341
  13. consider-narrowing-parameter:
    Parameter 'ss' is only used as 'ss.index'; consider accepting the attribute value directly
    https://github.com/pandas-dev/pandas/blob/b77f5fc2227d91b09f90bebd905cc6ff3ae3c1f4/pandas/core/arrays/sparse/scipy_sparse.py#L41

Effect on pytest:

New messages:

Details
  1. consider-narrowing-parameter:
    Parameter 'node' is only used as 'node.config'; consider accepting the attribute value directly
    https://github.com/pytest-dev/pytest/blob/77dceaa1fd1598293a7a39a837f859620a07002f/src/_pytest/debugging.py#L338
  2. consider-narrowing-parameter:
    Parameter 'rep' is only used as 'rep.longrepr'; consider accepting the attribute value directly
    https://github.com/pytest-dev/pytest/blob/77dceaa1fd1598293a7a39a837f859620a07002f/src/_pytest/reports.py#L573
  3. consider-narrowing-parameter:
    Parameter 'item' is only used as 'item.config'; consider accepting the attribute value directly
    https://github.com/pytest-dev/pytest/blob/77dceaa1fd1598293a7a39a837f859620a07002f/src/_pytest/assertion/truncate.py#L31
  4. consider-narrowing-parameter:
    Parameter 'eg' is only used as 'eg.exceptions'; consider accepting the attribute value directly
    https://github.com/pytest-dev/pytest/blob/77dceaa1fd1598293a7a39a837f859620a07002f/src/_pytest/_code/code.py#L653

Effect on astroid:

New messages:

Details
  1. consider-narrowing-parameter:
    Parameter 'node' is only used as 'node.args'; consider accepting the attribute value directly
    https://github.com/pylint-dev/astroid/blob/a0488ceab0436dd7fac738098b3ee0f05a485a15/astroid/brain/brain_builtin_inference.py#L509

Effect on sentry:

New messages:

Details
  1. consider-narrowing-parameter:
    Parameter 'release' is only used as 'release.id'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/models/releaseenvironment.py#L47
  2. consider-narrowing-parameter:
    Parameter 'environment' is only used as 'environment.id'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/models/releaseenvironment.py#L47
  3. consider-narrowing-parameter:
    Parameter 'request' is only used as 'request.user'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/issues/endpoints/organization_issues_count.py#L47
  4. consider-narrowing-parameter:
    Parameter 'detector' is only used as 'detector.workflow_condition_group'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/workflow_engine/migrations/0071_migrate_remaining_metric_alerts.py#L491
  5. consider-narrowing-parameter:
    Parameter 'detector' is only used as 'detector.workflow_condition_group'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/workflow_engine/migrations/0071_migrate_remaining_metric_alerts.py#L736
  6. consider-narrowing-parameter:
    Parameter 'state' is only used as 'state.counter_updates'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/workflow_engine/handlers/detector/stateful.py#L679
  7. consider-narrowing-parameter:
    Parameter 'error' is only used as 'error.checkin'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/monitors/processing_errors/manager.py#L58
  8. consider-narrowing-parameter:
    Parameter 'project' is only used as 'project.id'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/grouping/ingest/seer.py#L211
  9. consider-narrowing-parameter:
    Parameter 'event' is only used as 'event.platform'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/grouping/ingest/seer.py#L483
  10. consider-narrowing-parameter:
    Parameter 'side' is only used as 'side.name'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/runner/commands/backup.py#L397
  11. consider-narrowing-parameter:
    Parameter 'install' is only used as 'install.id'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/sentry_apps/installations.py#L152
  12. consider-narrowing-parameter:
    Parameter 'event' is only used as 'event.occurrence'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/notifications/notification_action/types.py#L437
  13. consider-narrowing-parameter:
    Parameter 'use_case_id' is only used as 'use_case_id.value'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/sentry_metrics/indexer/limiters/writes.py#L103
  14. consider-narrowing-parameter:
    Parameter 'ti' is only used as 'ti.attributes'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/replays/usecases/ingest/event_logger.py#L398
  15. consider-narrowing-parameter:
    Parameter 'ti' is only used as 'ti.attributes'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/replays/usecases/ingest/event_logger.py#L405
  16. consider-narrowing-parameter:
    Parameter 'request' is only used as 'request.META'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/feedback/endpoints/error_page_embed.py#L101
  17. consider-narrowing-parameter:
    Parameter 'flt' is only used as 'flt.id'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/relay/config/__init__.py#L1254
  18. consider-narrowing-parameter:
    Parameter 'request' is only used as 'request.GET'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/api/base.py#L584
  19. consider-narrowing-parameter:
    Parameter 'request' is only used as 'request.GET'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/api/endpoints/organization_events_trends_v2.py#L268
  20. consider-narrowing-parameter:
    Parameter 'organization' is only used as 'organization.id'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/api/endpoints/organization_releases.py#L102
  21. consider-narrowing-parameter:
    Parameter 'validator' is only used as 'validator.validated_data'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/api/endpoints/auth_index.py#L81
  22. consider-narrowing-parameter:
    Parameter 'request' is only used as 'request.access'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/api/endpoints/organization_access_request_details.py#L63
  23. consider-narrowing-parameter:
    Parameter 'event' is only used as 'event.dist'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/api/helpers/source_map_helper.py#L208
  24. consider-narrowing-parameter:
    Parameter 'artifact' is only used as 'artifact.dist_id'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/api/helpers/source_map_helper.py#L208
  25. consider-narrowing-parameter:
    Parameter 'workflow' is only used as 'workflow.created_by_id'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/api/serializers/models/rule.py#L407
  26. consider-narrowing-parameter:
    Parameter 'workflow' is only used as 'workflow.when_condition_group'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/api/serializers/models/rule.py#L432
  27. consider-narrowing-parameter:
    Parameter 'group' is only used as 'group.substatus'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/api/serializers/models/group.py#L191
  28. consider-narrowing-parameter:
    Parameter 'event' is only used as 'event.data'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/api/serializers/models/event.py#L220
  29. consider-narrowing-parameter:
    Parameter 'obj' is only used as 'obj.data'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/api/serializers/models/event.py#L375
  30. consider-narrowing-parameter:
    Parameter 'team' is only used as 'team.id'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/core/endpoints/organization_member_team_details.py#L559
  31. consider-narrowing-parameter:
    Parameter 'silo_mode' is only used as 'silo_mode.name'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/testutils/silo.py#L119
  32. consider-narrowing-parameter:
    Parameter 'provision_payload' is only used as 'provision_payload.provision_options'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/hybridcloud/services/region_organization_provisioning/impl.py#L84
  33. consider-narrowing-parameter:
    Parameter 'model' is only used as 'model._meta'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/db/router.py#L150
  34. consider-narrowing-parameter:
    Parameter 'organization' is only used as 'organization.id'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/integrations/notifications.py#L79
  35. consider-narrowing-parameter:
    Parameter 'integration' is only used as 'integration.id'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/integrations/middleware/hybrid_cloud/parser.py#L228
  36. consider-narrowing-parameter:
    Parameter 'notification_context' is only used as 'notification_context.id'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/integrations/slack/utils/notifications.py#L119
  37. consider-narrowing-parameter:
    Parameter 'integration' is only used as 'integration.id'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/integrations/slack/utils/notifications.py#L239
  38. consider-narrowing-parameter:
    Parameter 'integration' is only used as 'integration.id'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/integrations/github/webhook.py#L386
  39. consider-narrowing-parameter:
    Parameter 'user' is only used as 'user.id'; consider accepting the attribute value directly
    https://github.com/getsentry/sentry/blob/7a701584e61d8a093132eb37c45fd0359c1652ee/src/sentry/integrations/jira_server/integration.py#L1113

Effect on black:

New messages:

Details
  1. consider-narrowing-parameter:
    Parameter 'comment' is only used as 'comment.value'; consider accepting the attribute value directly
    https://github.com/psf/black/blob/acc73dc4ff97d2c1d5999914a9a182b6e2728b8a/src/black/comments.py#L201
  2. consider-narrowing-parameter:
    Parameter 'line' is only used as 'line.leaves'; consider accepting the attribute value directly
    https://github.com/psf/black/blob/acc73dc4ff97d2c1d5999914a9a182b6e2728b8a/src/black/linegen.py#L1321

Effect on home-assistant:

New messages:

Details
  1. consider-narrowing-parameter:
    Parameter 'blocked_integration' is only used as 'blocked_integration.lowest_good_version'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/loader.py#L1321
  2. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.config'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/loader.py#L1682
  3. consider-narrowing-parameter:
    Parameter 'config_entry' is only used as 'config_entry.domain'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/helpers/device_registry.py#L227
  4. consider-narrowing-parameter:
    Parameter 'form_step' is only used as 'form_step.options'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/helpers/schema_config_entry_flow.py#L168
  5. consider-narrowing-parameter:
    Parameter 'form_step' is only used as 'form_step.schema'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/helpers/schema_config_entry_flow.py#L173
  6. consider-narrowing-parameter:
    Parameter 'form_step' is only used as 'form_step.next_step'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/helpers/schema_config_entry_flow.py#L251
  7. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/sensor/recorder.py#L274
  8. consider-narrowing-parameter:
    Parameter 'e' is only used as 'e.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/teslemetry/coordinator.py#L38
  9. consider-narrowing-parameter:
    Parameter 'adv' is only used as 'adv.manufacturer_data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/aranet/config_flow.py#L41
  10. consider-narrowing-parameter:
    Parameter 'engine' is only used as 'engine.dialect'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/recorder/migration.py#L679
  11. consider-narrowing-parameter:
    Parameter 'engine' is only used as 'engine.dialect'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/recorder/migration.py#L917
  12. consider-narrowing-parameter:
    Parameter 'instance' is only used as 'instance.engine'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/recorder/util.py#L569
  13. consider-narrowing-parameter:
    Parameter 'instance' is only used as 'instance.database_engine'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/recorder/statistics.py#L2448
  14. consider-narrowing-parameter:
    Parameter 'subquery' is only used as 'subquery.c'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/recorder/history/__init__.py#L106
  15. consider-narrowing-parameter:
    Parameter 'entry' is only used as 'entry.entry_id'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/generic/__init__.py#L29
  16. consider-narrowing-parameter:
    Parameter 'field_details' is only used as 'field_details.default'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/mqtt/config_flow.py#L3762
  17. consider-narrowing-parameter:
    Parameter 'state' is only used as 'state.attributes'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/homekit/type_thermostats.py#L836
  18. consider-narrowing-parameter:
    Parameter 'auth_server_url' is only used as 'auth_server_url.path'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/mcp/config_flow.py#L475
  19. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/motioneye/__init__.py#L435
  20. consider-narrowing-parameter:
    Parameter 'response' is only used as 'response.candidates'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/google_generative_ai_conversation/tts.py#L207
  21. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.config_entries'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/google_generative_ai_conversation/__init__.py#L404
  22. consider-narrowing-parameter:
    Parameter 'device' is only used as 'device.status'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/tuya/light.py#L97
  23. consider-narrowing-parameter:
    Parameter 'entry' is only used as 'entry.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/fressnapf_tracker/config_flow.py#L148
  24. consider-narrowing-parameter:
    Parameter 'entry' is only used as 'entry.entry_id'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/roborock/__init__.py#L193
  25. consider-narrowing-parameter:
    Parameter 'announcement' is only used as 'announcement.tts_token'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/voip/assist_satellite.py#L473
  26. consider-narrowing-parameter:
    Parameter 'entry' is only used as 'entry.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/paperless_ngx/__init__.py#L65
  27. consider-narrowing-parameter:
    Parameter 'player' is only used as 'player.current_media'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/music_assistant/media_player.py#L553
  28. consider-narrowing-parameter:
    Parameter 'player' is only used as 'player.player_id'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/music_assistant/__init__.py#L166
  29. consider-narrowing-parameter:
    Parameter 'mass' is only used as 'mass.music'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/music_assistant/media_browser.py#L452
  30. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/script/__init__.py#L101
  31. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/script/__init__.py#L116
  32. consider-narrowing-parameter:
    Parameter 'event' is only used as 'event.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/websocket_api/messages.py#L194
  33. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/websocket_api/automation.py#L166
  34. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.config'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/tomorrowio/config_flow.py#L48
  35. consider-narrowing-parameter:
    Parameter 'entry' is only used as 'entry.entry_id'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/tplink_omada/__init__.py#L87
  36. consider-narrowing-parameter:
    Parameter 'item' is only used as 'item.identifier'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/immich/media_source.py#L85
  37. consider-narrowing-parameter:
    Parameter 'item' is only used as 'item.identifier'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/dlna_dms/media_source.py#L115
  38. consider-narrowing-parameter:
    Parameter 'resource' is only used as 'resource.protocol_info'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/dlna_dms/dms.py#L663
  39. consider-narrowing-parameter:
    Parameter 'resource' is only used as 'resource.protocol_info'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/dlna_dms/dms.py#L672
  40. consider-narrowing-parameter:
    Parameter 'resource' is only used as 'resource.instance'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/caldav/todo.py#L65
  41. consider-narrowing-parameter:
    Parameter 'source_state' is only used as 'source_state.attributes'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/integration/sensor.py#L383
  42. consider-narrowing-parameter:
    Parameter 'manager' is only used as 'manager.local_backup_agents'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/backup/http.py#L110
  43. consider-narrowing-parameter:
    Parameter 'manager' is only used as 'manager.local_backup_agents'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/backup/http.py#L136
  44. consider-narrowing-parameter:
    Parameter 'config_entry' is only used as 'config_entry.entry_id'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/tasmota/__init__.py#L113
  45. consider-narrowing-parameter:
    Parameter 'config_entry' is only used as 'config_entry.entry_id'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/minecraft_server/__init__.py#L139
  46. consider-narrowing-parameter:
    Parameter 'gateway' is only used as 'gateway.beds'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/sleepiq/__init__.py#L127
  47. consider-narrowing-parameter:
    Parameter 'config_entry' is only used as 'config_entry.entry_id'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/matter/__init__.py#L249
  48. consider-narrowing-parameter:
    Parameter 'entry' is only used as 'entry.runtime_data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/eq3btsmart/__init__.py#L119
  49. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/xiaomi_aqara/__init__.py#L231
  50. consider-narrowing-parameter:
    Parameter 'otbrdata' is only used as 'otbrdata.entry_id'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/otbr/util.py#L221
  51. consider-narrowing-parameter:
    Parameter 'process' is only used as 'process.stdout'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/go2rtc/server.py#L235
  52. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.config_entries'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/go2rtc/__init__.py#L201
  53. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/homematic/__init__.py#L614
  54. consider-narrowing-parameter:
    Parameter 'service' is only used as 'service.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/homematic/__init__.py#L614
  55. consider-narrowing-parameter:
    Parameter 'data' is only used as 'data.context'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/google_assistant/trait.py#L983
  56. consider-narrowing-parameter:
    Parameter 'data' is only used as 'data.config'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/google_assistant/trait.py#L2503
  57. consider-narrowing-parameter:
    Parameter 'entry' is only used as 'entry.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/mysensors/config_flow.py#L97
  58. consider-narrowing-parameter:
    Parameter 'entry' is only used as 'entry.entry_id'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/mysensors/gateway.py#L245
  59. consider-narrowing-parameter:
    Parameter 'entry' is only used as 'entry.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/elmax/__init__.py#L32
  60. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/stream/__init__.py#L146
  61. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/automation/__init__.py#L215
  62. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/automation/__init__.py#L229
  63. consider-narrowing-parameter:
    Parameter 'call' is only used as 'call.hass'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/nzbget/services.py#L25
  64. consider-narrowing-parameter:
    Parameter 'coordinator' is only used as 'coordinator.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/airzone/__init__.py#L44
  65. consider-narrowing-parameter:
    Parameter 'item' is only used as 'item.identifier'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/radio_browser/media_source.py#L135
  66. consider-narrowing-parameter:
    Parameter 'item' is only used as 'item.identifier'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/radio_browser/media_source.py#L171
  67. consider-narrowing-parameter:
    Parameter 'item' is only used as 'item.identifier'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/radio_browser/media_source.py#L217
  68. consider-narrowing-parameter:
    Parameter 'item' is only used as 'item.identifier'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/radio_browser/media_source.py#L245
  69. consider-narrowing-parameter:
    Parameter 'item' is only used as 'item.identifier'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/radio_browser/media_source.py#L320
  70. consider-narrowing-parameter:
    Parameter 'definition' is only used as 'definition.description'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/miele/sensor.py#L833
  71. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.config'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/cloud/http_api.py#L853
  72. consider-narrowing-parameter:
    Parameter 'data' is only used as 'data.indexes'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/google_air_quality/sensor.py#L37
  73. consider-narrowing-parameter:
    Parameter 'data' is only used as 'data.indexes'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/google_air_quality/sensor.py#L43
  74. consider-narrowing-parameter:
    Parameter 'call' is only used as 'call.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/nordpool/services.py#L72
  75. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.services'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/remember_the_milk/__init__.py#L78
  76. consider-narrowing-parameter:
    Parameter 'event' is only used as 'event.metadata'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/unifiprotect/event.py#L238
  77. consider-narrowing-parameter:
    Parameter 'api' is only used as 'api.recordings_list'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/philips_js/binary_sensor.py#L59
  78. consider-narrowing-parameter:
    Parameter 'effect' is only used as 'effect.style'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/philips_js/light.py#L262
  79. consider-narrowing-parameter:
    Parameter 'entry' is only used as 'entry.entry_id'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/sunricher_dali/__init__.py#L40
  80. consider-narrowing-parameter:
    Parameter 'entry' is only used as 'entry.name_by_user'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/onewire/config_flow.py#L276
  81. consider-narrowing-parameter:
    Parameter 'item' is only used as 'item.identifier'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/synology_dsm/media_source.py#L103
  82. consider-narrowing-parameter:
    Parameter 'wrapped_switch' is only used as 'wrapped_switch.name'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/switch_as_x/entity.py#L109
  83. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/lovelace/cast.py#L156
  84. consider-narrowing-parameter:
    Parameter 'data' is only used as 'data.condition'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/buienradar/weather.py#L172
  85. consider-narrowing-parameter:
    Parameter 'data' is only used as 'data.forecast'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/buienradar/weather.py#L178
  86. consider-narrowing-parameter:
    Parameter 'device' is only used as 'device.supported'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/qingping/config_flow.py#L37
  87. consider-narrowing-parameter:
    Parameter 'group_info' is only used as 'group_info.group_id'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/zha/helpers.py#L858
  88. consider-narrowing-parameter:
    Parameter 'group_event' is only used as 'group_event.group_info'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/zha/helpers.py#L931
  89. consider-narrowing-parameter:
    Parameter 'service' is only used as 'service.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/modbus/modbus.py#L173
  90. consider-narrowing-parameter:
    Parameter 'hass' is only used as 'hass.data'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/notify/legacy.py#L197
  91. consider-narrowing-parameter:
    Parameter 'backup' is only used as 'backup.job_id'; consider accepting the attribute value directly
    https://github.com/home-assistant/core/blob/9ad1356e4b3ee8c837c28dfde850fab8b6927aea/homeassistant/components/hassio/backup.py#L385

Effect on psycopg:

New messages:

Details
  1. consider-narrowing-parameter:
    Parameter 'context' is only used as 'context.adapters'; consider accepting the attribute value directly
    https://github.com/psycopg/psycopg/blob/e61b15ab1015d012d6f124ce2f2955bbf15a187f/psycopg/psycopg/crdb/_types.py#L75
  2. consider-narrowing-parameter:
    Parameter 'context' is only used as 'context.adapters'; consider accepting the attribute value directly
    https://github.com/psycopg/psycopg/blob/e61b15ab1015d012d6f124ce2f2955bbf15a187f/psycopg/psycopg/crdb/_types.py#L84

This comment was generated for commit 575bd39

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

Labels

Enhancement ✨ Improvement to a component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant