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

fix types returned by update and create role bindings #27

Open
rob-baron opened this issue Dec 7, 2021 · 1 comment
Open

fix types returned by update and create role bindings #27

rob-baron opened this issue Dec 7, 2021 · 1 comment
Assignees
Labels
good first issue Good for newcomers

Comments

@rob-baron
Copy link
Contributor

rob-baron commented Dec 7, 2021

Fix the types returned by update and create role bindings as they return more than Response.

When setting abstract function instead of specifying them as:

    class MocOpenShift(metaclass=abc.ABCMeta):
        @abc.abstractmethod -> Response
        def create_rolebindings(self, project_name, user_name, role)->Response:
            return Response()

        @abc.abstractmethod -> Response
        def update_rolebindings(self, project_name, role, rolebindings_json)->Response:
            return Response()

Had to use:

    class MocOpenShift(metaclass=abc.ABCMeta):
        @abc.abstractmethod
        def create_rolebindings(self, project_name, user_name, role):
            return 

        @abc.abstractmethod
        def update_rolebindings(self, project_name, role, rolebindings_json):
            return

Will also fix (#10)

@msdisme
Copy link

msdisme commented Jan 25, 2022

flagged as good first issue as Rob will create

  • a model/comment on how to do it
  • add mypi for type checking

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants