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 file ignore for line too long errors #687

Closed

Conversation

ecalifornica
Copy link
Member

@ecalifornica ecalifornica commented Sep 11, 2023

Ignores linter error E501, continuation of #674 as I neglected to lint the tests/ path.

Unblocks #673

Copy link
Member

@reece reece left a comment

Choose a reason for hiding this comment

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

Better: We can remove all of the future lines (in their entirety) from all files.
How about closing this PR without merging, then doing that?

@ecalifornica
Copy link
Member Author

You read my mind, I was grepping for those __future__ imports earlier today. I've opened #688 to track that work.

This change is not targeting the __future__ module imports on the line below, but instead instructs ruff to ignore the line-too-long error for all lines in the file. Looks like the error is raised by the visual table example comments.

tests/test_hgvs_variantmapper_gcp.py:40:121: E501 Line too long (162 > 120 characters)
tests/test_hgvs_variantmapper_gcp.py:51:121: E501 Line too long (162 > 120 characters)
tests/test_hgvs_variantmapper_gcp.py:62:121: E501 Line too long (162 > 120 characters)
tests/test_hgvs_variantmapper_gcp.py:63:121: E501 Line too long (123 > 120 characters)
tests/test_hgvs_variantmapper_gcp.py:64:121: E501 Line too long (123 > 120 characters)
tests/test_hgvs_variantmapper_gcp.py:65:121: E501 Line too long (123 > 120 characters)
tests/test_hgvs_variantmapper_gcp.py:66:121: E501 Line too long (123 > 120 characters)
tests/test_hgvs_variantmapper_gcp.py:67:121: E501 Line too long (123 > 120 characters)
tests/test_hgvs_variantmapper_gcp.py:74:121: E501 Line too long (162 > 120 characters)
tests/test_hgvs_variantmapper_gcp.py:85:121: E501 Line too long (165 > 120 characters)

See also:
https://beta.ruff.rs/docs/configuration/#error-suppression

@reece
Copy link
Member

reece commented Sep 12, 2023

This change is not targeting the __future__ module imports on the line below, but instead instructs ruff to ignore the line-too-long error for all lines in the file. Looks like the error is raised by the visual table example comments.

I misunderstood. I though the noqa pragma was for the future line. I now understand that it's for the whole file. Thanks.

@reece
Copy link
Member

reece commented Sep 12, 2023

How about:

  • set ruff line length = 100
  • set black line length = 100
  • reformat with make reformat
    ?

@ecalifornica
Copy link
Member Author

How about:
* set ruff line length = 100
* set black line length = 100
* reformat with make reformat
?

Straightforward enough. Seems that black does not format comments or multi-line strings. Lowering the line-length configuration from 120 to 100 leaves 88 instances of the E501 Line too long error when ruff runs. These errors could be fixed by manually adding the noqa pragma directive to those lines.

Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale Issue is stale and subject to automatic closing label Nov 30, 2023
Copy link

github-actions bot commented Dec 7, 2023

This PR was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this Dec 7, 2023
@reece reece removed stale Issue is stale and subject to automatic closing closed-by-stale labels Dec 8, 2023
@reece reece reopened this Dec 8, 2023
Copy link

github-actions bot commented Jan 8, 2024

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale Issue is stale and subject to automatic closing label Jan 8, 2024
Copy link

This PR was closed because it has been stalled for 7 days with no activity.

@github-actions github-actions bot closed this Jan 15, 2024
@reece reece reopened this Feb 19, 2024
@reece reece requested a review from a team as a code owner February 19, 2024 17:44
@reece reece added resurrected and removed stale Issue is stale and subject to automatic closing labels Feb 19, 2024
@reece
Copy link
Member

reece commented Feb 19, 2024

This issue was closed by stalebot. It has been reopened to give more time for community review. See biocommons coding guidelines for stale issue and pull request policies. This resurrection is expected to be a one-time event.

Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale Issue is stale and subject to automatic closing label Mar 21, 2024
@ahwagner ahwagner removed the stale Issue is stale and subject to automatic closing label Mar 26, 2024
Copy link

This PR is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale Issue is stale and subject to automatic closing label Apr 26, 2024
Copy link

github-actions bot commented May 3, 2024

This PR was closed because it has been stalled for 7 days with no activity.

@reece
Copy link
Member

reece commented May 20, 2024

@ecalifornica : Thanks for contributing this. We're going to incorporate ideas from this PR into the template repo, and then propagate to project repos.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-by-stale resurrected stale Issue is stale and subject to automatic closing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants