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

Create a path type of argument that automatically expand user/var #6494

Merged
merged 4 commits into from
May 3, 2022

Conversation

Pierre-Sassoulas
Copy link
Member

Type of Changes

Type
✨ New feature
🔨 Refactoring

Description

Refactor prior to #6493, permitted by the migration to argparse. It could permit to expanduser in various pylint configuration / options, so it's a feature.

@Pierre-Sassoulas Pierre-Sassoulas added Enhancement ✨ Improvement to a component Maintenance Discussion or action around maintaining pylint or the dev workflow labels May 3, 2022
@Pierre-Sassoulas Pierre-Sassoulas added this to the 2.14.0 milestone May 3, 2022
@Pierre-Sassoulas Pierre-Sassoulas marked this pull request as draft May 3, 2022 09:20
Comment on lines 89 to 91
# We'd need to distinguish between input path that should exist and output path that do not
# if not os.path.exists(value):
# raise argparse.ArgumentTypeError(f"'{value}' is not a valid path is does not exists.")
Copy link
Member Author

Choose a reason for hiding this comment

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

@DanielNoord what do you think, is it worth it ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Probably not, as I can imagine we might also want to use this as an output path at some point. So then it not existing is not a problem.

I think the OSError should probably be caught in the checkers themselves.

@coveralls
Copy link

coveralls commented May 3, 2022

Pull Request Test Coverage Report for Build 2263887299

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.006%) to 95.173%

Files with Coverage Reduction New Missed Lines %
pylint/checkers/spelling.py 1 76.96%
Totals Coverage Status
Change from base Build 2262664840: 0.006%
Covered Lines: 15831
Relevant Lines: 16634

💛 - Coveralls

@Pierre-Sassoulas Pierre-Sassoulas marked this pull request as ready for review May 3, 2022 10:41
Co-authored-by: Daniël van Noord <[email protected]>
@Pierre-Sassoulas Pierre-Sassoulas merged commit f2f3182 into main May 3, 2022
@Pierre-Sassoulas Pierre-Sassoulas deleted the expanduser-in-path-directly-in-argparse branch May 3, 2022 13:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ Improvement to a component Maintenance Discussion or action around maintaining pylint or the dev workflow
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants