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 the possible choices in the generated toml doc #8949

Merged

Conversation

Pierre-Sassoulas
Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas commented Aug 13, 2023

Type of Changes

Type
βœ“ πŸ“œ Docs

Description

New feature prior to #6736 and #8950

@codecov
Copy link

codecov bot commented Aug 13, 2023

Codecov Report

Merging #8949 (11965ee) into main (5e233c5) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #8949   +/-   ##
=======================================
  Coverage   95.74%   95.74%           
=======================================
  Files         173      173           
  Lines       18557    18557           
=======================================
  Hits        17767    17767           
  Misses        790      790           

@@ -538,10 +538,12 @@ Standard Checkers
.. code-block:: toml

[tool.pylint.basic]
# Possible choices: ['snake_case', 'camelCase', 'PascalCase', 'UPPER_CASE', 'any']
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps these could be enums - making the possible values a bit easier to maintain?
for example:

from enum import StrEnum


class NamingStyle(StrEnum):
    SNAKE_CASE: "snake_case"
    CAMEL_CASE: "camelCase"
    ...

attr-naming-style = NamingStyle.SNAKE_CASE.value

Copy link
Member Author

Choose a reason for hiding this comment

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

Let's do a refactor in another MR if necessary but I think it's internal so only pylint dev are using this and I feel like it's working well enough.

Copy link
Member

@mbyrnepr2 mbyrnepr2 left a comment

Choose a reason for hiding this comment

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

Looks good. One suggestion but could leave it out or separate that into a follow-up also.

@Pierre-Sassoulas Pierre-Sassoulas merged commit b02a5d7 into pylint-dev:main Aug 13, 2023
30 checks passed
@Pierre-Sassoulas Pierre-Sassoulas deleted the add-choices-in-toml-doc branch August 13, 2023 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation πŸ“— Skip news πŸ”‡ This change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants