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

Fix AstroidError in similarity checker with imports/signatures ignored #6357

Merged
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
b0d5dd0
Fix AstroidError in similarity checker with imports/signatures ignored
jacobtylerwalls Apr 16, 2022
4821234
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 16, 2022
de330e4
Whitespace
jacobtylerwalls Apr 16, 2022
4f55194
Minor optimization
jacobtylerwalls Apr 16, 2022
0e66357
Docstring style
jacobtylerwalls Apr 16, 2022
ca35944
Simplify
jacobtylerwalls Apr 16, 2022
d2c2a83
All tests with ignore imports/signatures
jacobtylerwalls Apr 16, 2022
433941f
Clarify comment
jacobtylerwalls Apr 16, 2022
84173b9
Look ahead to next line
jacobtylerwalls Apr 16, 2022
4e8ce79
This test still fails on 2.13
jacobtylerwalls Apr 16, 2022
27c62fb
Fix expected result and refactor
jacobtylerwalls Apr 16, 2022
0eb0ce6
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 16, 2022
76f26a0
Refactor
jacobtylerwalls Apr 16, 2022
df5bb80
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 16, 2022
2723edd
add disable
jacobtylerwalls Apr 16, 2022
343923b
typo/reword
jacobtylerwalls Apr 16, 2022
dabc26b
Alternate solution
jacobtylerwalls Apr 16, 2022
17dfbc7
Remove mooted test condition
jacobtylerwalls Apr 16, 2022
0cda0c0
avoid some iteration
jacobtylerwalls Apr 16, 2022
8763570
Merge 'main'
jacobtylerwalls Apr 16, 2022
d5cdbbf
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 16, 2022
6e01357
Remove overkill tests (now that no lines are altered before ast re-pa…
jacobtylerwalls Apr 16, 2022
9dcfeda
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Apr 16, 2022
3dfba99
add --
jacobtylerwalls Apr 16, 2022
cab9ef4
better typing import
jacobtylerwalls Apr 16, 2022
62028e1
Get the except in the right place
jacobtylerwalls Apr 16, 2022
53660be
More specific typing
jacobtylerwalls Apr 17, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pylint/checkers/similar.py
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ def stripped_lines(
ignore_docstrings: bool,
ignore_imports: bool,
ignore_signatures: bool,
line_enabled_callback: Optional[Callable] = None,
line_enabled_callback: Callable | None = None,
Copy link
Member Author

Choose a reason for hiding this comment

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

I fought with this locally and finally just no-verified it. Why is this syntax okay with our minimum python version of 3.7.2? (Well, 3.6.2, since we are talking about backporting, potentially.)

Copy link
Member Author

Choose a reason for hiding this comment

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

oh, did we future import annotations everywhere? ah. but still a problem with 3.6, then.

Copy link
Member Author

Choose a reason for hiding this comment

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

I guess we don't have to backport this if only one user reported it and 2.14 is coming soon.

This comment was marked as resolved.

Copy link
Member Author

Choose a reason for hiding this comment

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

Cool. LMK if I should move the release note to 2.14. If we backport I guess we can just use different type annotation syntax.

) -> list[LineSpecifs]:
"""Return tuples of line/line number/line type with leading/trailing whitespace and any ignored code features removed.

Expand Down