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

Module linting: refactor parsing of input channel names. #1571

Merged
merged 1 commit into from
May 12, 2022

Conversation

ewels
Copy link
Member

@ewels ewels commented May 12, 2022

No more split, regexes FTW!
Fixes #1542

PR checklist

  • This comment contains a description of changes (with reason)
  • CHANGELOG.md is updated
  • If you've fixed a bug or added code that should be tested, add tests!
  • Documentation in docs is updated

@codecov

This comment was marked as outdated.

Copy link
Member

@mirpedrol mirpedrol left a comment

Choose a reason for hiding this comment

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

Tested with nf-core modules lint busco and it doesn't fail 👍

@ewels ewels merged commit 7f14c37 into nf-core:dev May 12, 2022
@ewels ewels deleted the fix-1542 branch May 12, 2022 14:25
Copy link
Contributor

@Midnighter Midnighter left a comment

Choose a reason for hiding this comment

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

One suggestion, looks good otherwise.

"""
inputs = []
# Remove comments and trailing whitespace
line, *_ = line_raw.partition("//")
Copy link
Contributor

Choose a reason for hiding this comment

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

How about?

Suggested change
line, *_ = line_raw.partition("//")
line = line_raw.split("//")[0]

@Midnighter
Copy link
Contributor

Sheesh, things move fast 🙂

@ewels
Copy link
Member Author

ewels commented May 12, 2022

hah, sorry! Yeah that's nicer 👍🏻

ewels added a commit to ewels/nf-core-tools that referenced this pull request May 12, 2022
@ewels ewels mentioned this pull request May 12, 2022
4 tasks
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.

3 participants