Skip to content

[config] Create a config parsing class indpendant from Pylinter #8707

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

Merged
merged 5 commits into from
May 22, 2023

Conversation

Pierre-Sassoulas
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas commented May 21, 2023

Type of Changes

Type
βœ“ πŸ”¨ Refactoring

Description

This will permit to parse config file without having to instantiate a linter for tool working on pylint configuration like #5462. another way to do this would be to extract the logic and create another class that we could use in _ConfigurationFileParser like here: Pierre-Sassoulas@4ccbee1

@Pierre-Sassoulas Pierre-Sassoulas added Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news πŸ”‡ This change does not require a changelog entry labels May 21, 2023
@codecov
Copy link

codecov bot commented May 21, 2023

Codecov Report

Merging #8707 (398982c) into main (893cb78) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8707   +/-   ##
=======================================
  Coverage   95.82%   95.82%           
=======================================
  Files         173      173           
  Lines       18378    18381    +3     
=======================================
+ Hits        17610    17613    +3     
  Misses        768      768           
Impacted Files Coverage Ξ”
pylint/config/config_file_parser.py 100.00% <100.00%> (ΓΈ)

@github-actions

This comment has been minimized.

@Pierre-Sassoulas
Copy link
Member Author

I think I like the alternate way more. Cleaner final result it's harder to badly instantiate the classes.

@DanielNoord
Copy link
Collaborator

Yes, let's go for the alternative! Nice solution.

One early review comment, let's make the new class private (or perhaps even just make the whole file private by underscoring it). I never want to deal with DeprecationWarnings ever again πŸ˜„

This will permit to parse config file without having to instantiate
a linter for tool working on pylint configuration like #5462
@Pierre-Sassoulas Pierre-Sassoulas force-pushed the refactor-config-parsing branch from ed8f2ac to e24e936 Compare May 22, 2023 06:52
@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

@Pierre-Sassoulas Pierre-Sassoulas force-pushed the refactor-config-parsing branch from 9027cde to 12299ee Compare May 22, 2023 15:09
@Pierre-Sassoulas Pierre-Sassoulas force-pushed the refactor-config-parsing branch from 12299ee to 398982c Compare May 22, 2023 15:12
@github-actions
Copy link
Contributor

πŸ€– According to the primer, this change has no effect on the checked open source code. πŸ€–πŸŽ‰

This comment was generated for commit 398982c

@Pierre-Sassoulas Pierre-Sassoulas merged commit 231447c into main May 22, 2023
@Pierre-Sassoulas Pierre-Sassoulas deleted the refactor-config-parsing branch May 22, 2023 20:22
@Pierre-Sassoulas Pierre-Sassoulas changed the title [config] Make the linter optional during config parsing [config] Create a config parsing class indpendant from Pylinter May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Maintenance Discussion or action around maintaining pylint or the dev workflow Skip news πŸ”‡ This change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants