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

feat: Add refurb linter #35

Merged
merged 5 commits into from
Jan 23, 2023
Merged

feat: Add refurb linter #35

merged 5 commits into from
Jan 23, 2023

Conversation

q0w
Copy link
Contributor

@q0w q0w commented Jan 20, 2023

Copy link
Owner

@justinchuby justinchuby 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, and this looks like a cool linter we should enable in this repo. Could you help adding the lintrunner config to this repo too?

lintrunner_adapters/adapters/refurb_linter.py Outdated Show resolved Hide resolved
lintrunner_adapters/adapters/refurb_linter.py Outdated Show resolved Hide resolved
lintrunner_adapters/adapters/refurb_linter.py Outdated Show resolved Hide resolved
lintrunner_adapters/adapters/refurb_linter.py Outdated Show resolved Hide resolved
parser.add_argument(
"--severity",
action="append",
help="map code to severity (e.g. `FURB109:advice`)",
Copy link
Owner

Choose a reason for hiding this comment

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

What should users input if they wanted to map more than one codes? Would be very nice to show in the example

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Use multiple --severity arg

requirements-test.txt Show resolved Hide resolved
@q0w
Copy link
Contributor Author

q0w commented Jan 22, 2023

Thank you, and this looks like a cool linter we should enable in this repo. Could you help adding the lintrunner config to this repo too?

Refurb is pretty slow compared with compiled mypy. dosisod/refurb#57. What do you think?

@justinchuby
Copy link
Owner

Thank you, and this looks like a cool linter we should enable in this repo. Could you help adding the lintrunner config to this repo too?

Refurb is pretty slow compared with compiled mypy. dosisod/refurb#57. What do you think?

In that case let’s merge this first and I’ll experiment with it

@q0w
Copy link
Contributor Author

q0w commented Jan 22, 2023

How add refurb only for python3.10+ ?

@q0w
Copy link
Contributor Author

q0w commented Jan 22, 2023

Why lintrunner does not fail if there is no tool available in PATH? Like here pip install refurb only for py>=3.10

@justinchuby
Copy link
Owner

I will need to look more deeply

@justinchuby justinchuby merged commit 33e8615 into justinchuby:main Jan 23, 2023
@justinchuby
Copy link
Owner

Looks like its because run_command needs check=True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants