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

Use .pylintrc files #654

Merged
merged 2 commits into from
Jan 19, 2024
Merged

Conversation

macohen
Copy link
Contributor

@macohen macohen commented Jan 19, 2024

Description

switches pylint to use .pylintrc configs instead of python generated pylint commands

Issues Resolved

#645

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Mark Cohen <markcoh@amazon.com>
…equires camel case instead of snake case

Signed-off-by: Mark Cohen <markcoh@amazon.com>
Copy link

codecov bot commented Jan 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0ddbf8c) 72.13% compared to head (6866675) 72.13%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #654   +/-   ##
=======================================
  Coverage   72.13%   72.13%           
=======================================
  Files          89       89           
  Lines        7945     7945           
=======================================
  Hits         5731     5731           
  Misses       2214     2214           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -102,7 +102,11 @@ def lint(session: Any) -> None:
session.run("black", "--check", *SOURCE_FILES)
session.run("flake8", *SOURCE_FILES)

lint_per_folder(session)
pylint_overrides = ["opensearchpy/", "test_opensearchpy/"]
Copy link
Member

Choose a reason for hiding this comment

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

Instead of this find all .pylintrc files under first level subfolders and run those?

@macohen
Copy link
Contributor Author

macohen commented Jan 19, 2024

The one thing I don't like about this solution is that each .pylintrc stands on its own. There's no way to inherit the config from a higher level folder so if max-line-length should be 240 across the whole project, it needs to be in each .pylintrc.

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

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

A lot better.

@dblock dblock added the skip-changelog Skips changelog verifier label Jan 19, 2024
@dblock dblock merged commit 7c66e8c into opensearch-project:main Jan 19, 2024
56 of 64 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Skips changelog verifier
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants