Skip to content

Linting: limit private member access #3222

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 7 commits into from
Mar 30, 2024
Merged

Linting: limit private member access #3222

merged 7 commits into from
Mar 30, 2024

Conversation

amolenaar
Copy link
Member

@amolenaar amolenaar commented Mar 30, 2024

PR Type

What kind of change does this PR introduce?

  • Bug fix
  • Feature
  • Chore (refactoring, formatting, local variables, other cleanup)
  • Documentation content changes

What is the current behavior?

In some places private (start with underscore) members are accessed outside of the object.

Issue Number: N/A

What is the new behavior?

private member access is checked by a linting rule: SLF001.

A lot of property-as-function (head_end = property(lambda self: ...)) have been replaced by decorator syntax.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@github-actions github-actions bot added python Pull requests that update Python code packaging Update to packaging aspects labels Mar 30, 2024
@amolenaar amolenaar requested a review from danyeaw March 30, 2024 20:42
@amolenaar amolenaar changed the title Private member access Linting: limit private member access Mar 30, 2024
Copy link
Member

@danyeaw danyeaw left a comment

Choose a reason for hiding this comment

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

Nice improvements @amolenaar!

@danyeaw danyeaw added chore Maintenance related PR and removed python Pull requests that update Python code packaging Update to packaging aspects labels Mar 30, 2024
@danyeaw danyeaw merged commit a5bedc1 into main Mar 30, 2024
@danyeaw danyeaw deleted the private-member-access branch March 30, 2024 21:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Maintenance related PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants