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

Warnings about "Access to a protected member" #56

Open
Wuodan opened this issue Aug 21, 2024 · 1 comment · May be fixed by #57
Open

Warnings about "Access to a protected member" #56

Wuodan opened this issue Aug 21, 2024 · 1 comment · May be fixed by #57

Comments

@Wuodan
Copy link
Contributor

Wuodan commented Aug 21, 2024

Intellij itself (not from SonarLint this time) shows warnings when a "protected member" (name prefixed with underscore) is accessed from outside.

I tried to improve those code lines as much as possible in PR #57

Wuodan added a commit to Wuodan/linesight that referenced this issue Aug 21, 2024
Note: ListStorage._storage is not publicly accessible
trackmania_rl/buffer_utilities.py:281:
`target_buffer.extend(source_buffer.storage._storage)`
Wuodan added a commit to Wuodan/linesight that referenced this issue Aug 21, 2024
Wuodan added a commit to Wuodan/linesight that referenced this issue Aug 21, 2024
Note: ListStorage._storage is not publicly accessible
trackmania_rl/buffer_utilities.py:281:
`target_buffer.extend(source_buffer.storage._storage)`
Wuodan added a commit to Wuodan/linesight that referenced this issue Aug 21, 2024
Note: ListStorage._storage is not publicly accessible
trackmania_rl/buffer_utilities.py:281:
`target_buffer.extend(source_buffer.storage._storage)`
Wuodan added a commit to Wuodan/linesight that referenced this issue Aug 21, 2024
Note: ListStorage._storage is not publicly accessible
trackmania_rl/buffer_utilities.py:281:
`target_buffer.extend(source_buffer.storage._storage)`
Wuodan added a commit to Wuodan/linesight that referenced this issue Aug 21, 2024
Note: ListStorage._storage is not publicly accessible
trackmania_rl/buffer_utilities.py:281:
`target_buffer.extend(source_buffer.storage._storage)`

Fixes Linesight-RL#56
@Wuodan Wuodan linked a pull request Aug 21, 2024 that will close this issue
Wuodan added a commit to Wuodan/linesight that referenced this issue Aug 21, 2024
Note: ListStorage._storage is not publicly accessible
trackmania_rl/buffer_utilities.py:281:
`target_buffer.extend(source_buffer.storage._storage)`
Wuodan added a commit to Wuodan/linesight that referenced this issue Aug 21, 2024
Note: ListStorage._storage is not publicly accessible
trackmania_rl/buffer_utilities.py:281:
`target_buffer.extend(source_buffer.storage._storage)`

Fixes Linesight-RL#56
Wuodan added a commit to Wuodan/linesight that referenced this issue Aug 21, 2024
Note: ListStorage._storage is not publicly accessible
trackmania_rl/buffer_utilities.py:281:
`target_buffer.extend(source_buffer.storage._storage)`
Wuodan added a commit to Wuodan/linesight that referenced this issue Aug 21, 2024
Note: ListStorage._storage is not publicly accessible
trackmania_rl/buffer_utilities.py:281:
`target_buffer.extend(source_buffer.storage._storage)`
Wuodan added a commit to Wuodan/linesight that referenced this issue Aug 21, 2024
Note: ListStorage._storage is not publicly accessible
trackmania_rl/buffer_utilities.py:281:
`target_buffer.extend(source_buffer.storage._storage)`

Fixes Linesight-RL#56
Wuodan added a commit to Wuodan/linesight that referenced this issue Aug 21, 2024
Note: ListStorage._storage is not publicly accessible
trackmania_rl/buffer_utilities.py:281:
`target_buffer.extend(source_buffer.storage._storage)`
@Wuodan
Copy link
Contributor Author

Wuodan commented Aug 22, 2024

Tested until files were written to save/<run_name>. No new warnings or errors seen.

Wuodan added a commit to Wuodan/linesight that referenced this issue Aug 22, 2024
Note: ListStorage._storage is not publicly accessible
trackmania_rl/buffer_utilities.py:281:
`target_buffer.extend(source_buffer.storage._storage)`
Wuodan added a commit to Wuodan/linesight that referenced this issue Aug 30, 2024
IntelliJ complains when a protected member is accessed from outside the class.

Example:
- tminterface2.py: class `TMInterface` has a method `_read_int32()`
- add_cp_as_triggers.py: uses the method and has a warning

This commit fixes the warnings where possible.

The warning is not always correct as found here:

trackmania_rl/buffer_utilities.py:280
`target_buffer.extend(source_buffer.storage._storage)`
Warning: _ListStorage._storage is not publicly accessible_ is wrong because `ListStorage._storage` is not publicly accessible

Fixes Linesight-RL#56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant