Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(🐞) Add the missing period in error message #9485

Merged
merged 1 commit into from
Jan 12, 2024

Conversation

KotlinIsland
Copy link
Contributor

Summary

I noticed that there should be a missing period added to some of the new error messages for Unnecessary dunder call:

sandpit\test.py:6:16: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function..

Test Plan

Static analysis of the implementation, as this has no existing test cases.

Copy link

codspeed-hq bot commented Jan 12, 2024

CodSpeed Performance Report

Merging #9485 will improve performances by 4.55%

Comparing KotlinIsland:fix-double-period (330df7d) with main (a31a314)

Summary

⚡ 1 improvements
✅ 29 untouched benchmarks

Benchmarks breakdown

Benchmark main KotlinIsland:fix-double-period Change
parser[numpy/ctypeslib.py] 12.8 ms 12.2 ms +4.55%

Copy link
Member

@charliermarsh charliermarsh left a comment

Choose a reason for hiding this comment

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

Thank you!

)),
"__getattribute__" => Some(Self::MessageOnly(
"Access attribute directly or use getattr built-in function.",
"Access attribute directly or use getattr built-in function",
Copy link
Member

Choose a reason for hiding this comment

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

I'm guessing that I did a search and replace here to remove the periods but missed all the variants that are on their own line :)

@charliermarsh charliermarsh added the bug Something isn't working label Jan 12, 2024
@charliermarsh charliermarsh merged commit 3daf6e1 into astral-sh:main Jan 12, 2024
17 checks passed
Copy link
Contributor

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

ℹ️ ecosystem check detected linter changes. (+200 -200 violations, +0 -0 fixes in 6 projects; 37 projects unchanged)

apache/airflow (+28 -28 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview --select ALL

+ airflow/cli/commands/dag_command.py:471:25: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function.
- airflow/cli/commands/dag_command.py:471:25: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function..
+ airflow/providers/fab/auth_manager/cli_commands/user_command.py:167:44: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function.
- airflow/providers/fab/auth_manager/cli_commands/user_command.py:167:44: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function..
+ airflow/providers/fab/auth_manager/cli_commands/user_command.py:60:66: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function.
- airflow/providers/fab/auth_manager/cli_commands/user_command.py:60:66: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function..
+ airflow/providers/salesforce/hooks/salesforce.py:194:16: PLC2801 Unnecessary dunder call to `__getattr__`. Access attribute directly or use getattr built-in function.
- airflow/providers/salesforce/hooks/salesforce.py:194:16: PLC2801 Unnecessary dunder call to `__getattr__`. Access attribute directly or use getattr built-in function..
+ airflow/providers/salesforce/operators/bulk.py:102:22: PLC2801 Unnecessary dunder call to `__getattr__`. Access attribute directly or use getattr built-in function.
- airflow/providers/salesforce/operators/bulk.py:102:22: PLC2801 Unnecessary dunder call to `__getattr__`. Access attribute directly or use getattr built-in function..
... 46 additional changes omitted for project

aws/aws-sam-cli (+8 -8 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview

+ tests/unit/hook_packages/terraform/hooks/prepare/test_enrich.py:1164:24: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function.
- tests/unit/hook_packages/terraform/hooks/prepare/test_enrich.py:1164:24: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function..
+ tests/unit/hook_packages/terraform/hooks/prepare/test_enrich.py:1165:35: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function.
- tests/unit/hook_packages/terraform/hooks/prepare/test_enrich.py:1165:35: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function..
+ tests/unit/hook_packages/terraform/hooks/prepare/test_enrich.py:1192:24: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function.
- tests/unit/hook_packages/terraform/hooks/prepare/test_enrich.py:1192:24: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function..
+ tests/unit/hook_packages/terraform/hooks/prepare/test_enrich.py:1193:35: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function.
- tests/unit/hook_packages/terraform/hooks/prepare/test_enrich.py:1193:35: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function..
+ tests/unit/hook_packages/terraform/hooks/prepare/test_enrich.py:856:24: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function.
- tests/unit/hook_packages/terraform/hooks/prepare/test_enrich.py:856:24: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function..
... 6 additional changes omitted for project

bokeh/bokeh (+1 -1 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview --select ALL

+ src/bokeh/models/plots.py:909:20: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function.
- src/bokeh/models/plots.py:909:20: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function..

ibis-project/ibis (+19 -19 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview

+ ibis/common/bases.py:198:13: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- ibis/common/bases.py:198:13: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
+ ibis/common/bases.py:212:13: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- ibis/common/bases.py:212:13: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
+ ibis/common/bases.py:239:13: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- ibis/common/bases.py:239:13: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
+ ibis/common/bases.py:241:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- ibis/common/bases.py:241:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
+ ibis/common/bases.py:245:13: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- ibis/common/bases.py:245:13: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
... 28 additional changes omitted for project

pandas-dev/pandas (+45 -45 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview

+ pandas/_config/config.py:227:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- pandas/_config/config.py:227:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
+ pandas/_config/config.py:228:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- pandas/_config/config.py:228:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
+ pandas/_config/config.py:231:18: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function.
- pandas/_config/config.py:231:18: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function..
+ pandas/_config/config.py:243:18: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function.
- pandas/_config/config.py:243:18: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function..
+ pandas/_config/config.py:248:17: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function.
- pandas/_config/config.py:248:17: PLC2801 Unnecessary dunder call to `__getattribute__`. Access attribute directly or use getattr built-in function..
+ pandas/core/accessor.py:229:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
... 79 additional changes omitted for project

rotki/rotki (+99 -99 violations, +0 -0 fixes)

ruff check --no-cache --exit-zero --preview

+ rotkehlchen/assets/asset.py:105:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- rotkehlchen/assets/asset.py:105:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
+ rotkehlchen/assets/asset.py:301:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- rotkehlchen/assets/asset.py:301:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
+ rotkehlchen/assets/asset.py:302:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- rotkehlchen/assets/asset.py:302:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
+ rotkehlchen/assets/asset.py:303:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- rotkehlchen/assets/asset.py:303:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
+ rotkehlchen/assets/asset.py:304:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- rotkehlchen/assets/asset.py:304:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
+ rotkehlchen/assets/asset.py:305:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- rotkehlchen/assets/asset.py:305:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
+ rotkehlchen/assets/asset.py:306:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- rotkehlchen/assets/asset.py:306:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
+ rotkehlchen/assets/asset.py:318:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- rotkehlchen/assets/asset.py:318:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
+ rotkehlchen/assets/asset.py:319:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- rotkehlchen/assets/asset.py:319:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
+ rotkehlchen/assets/asset.py:320:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- rotkehlchen/assets/asset.py:320:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
+ rotkehlchen/assets/asset.py:321:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- rotkehlchen/assets/asset.py:321:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
+ rotkehlchen/assets/asset.py:322:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function.
- rotkehlchen/assets/asset.py:322:9: PLC2801 Unnecessary dunder call to `__setattr__`. Mutate attribute directly or use setattr built-in function..
... 174 additional changes omitted for project

Changes by rule (1 rules affected)

code total + violation - violation + fix - fix
PLC2801 400 200 200 0 0

@KotlinIsland KotlinIsland deleted the fix-double-period branch January 12, 2024 04:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants