Skip to content

Commit

Permalink
Silence pylint on name-mangled attributes
Browse files Browse the repository at this point in the history
see 0a7d623

The attribute name is Github.__requester which is automatically
converted at runtime to ._Github__requester!
  • Loading branch information
atodorov committed May 6, 2024
1 parent ed80d60 commit c75bd01
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tcms_github_app/tests/test_github_interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def test_utils_PatchedGithub_and_upstream_Github_should_have_the_same_signature(

def test_instantiate_an_object_from_utils_PatchedGithub_class(self):
inst = utils.PatchedGithub(auth=github.Auth.Token("testing-token"))
self.assertIsNotNone(inst._Github__requester)
self.assertIsNotNone(inst._Github__requester) # pylint: disable=no-member

inst = github.Github(auth=github.Auth.Token("testing-token"))
self.assertIsNotNone(inst._Github__requester)
2 changes: 1 addition & 1 deletion tcms_github_app/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_installation(self, inst_id):
https://github.com/PyGithub/PyGithub/issues/1776
"""
# b/c this is self.__requester in the parent class
requester = self._Github__requester # pylint: disable=protected-access
requester = self._Github__requester # pylint: disable=protected-access,no-member

return github.Installation.Installation(
requester, headers={}, attributes={"id": inst_id}, completed=True
Expand Down

0 comments on commit c75bd01

Please sign in to comment.