Skip to content
This repository was archived by the owner on Sep 26, 2025. It is now read-only.

Comments

Make LTIBase.is_role() an instance method#93

Open
yuttie wants to merge 1 commit intomitodl:masterfrom
yuttie:make-is_role-instance-method
Open

Make LTIBase.is_role() an instance method#93
yuttie wants to merge 1 commit intomitodl:masterfrom
yuttie:make-is_role-instance-method

Conversation

@yuttie
Copy link

@yuttie yuttie commented Oct 8, 2019

What are the relevant tickets?

None.

What does this PR do?

This PR proposes to remove @staticmethod from the definition of is_role() of LTIBase class.

How should this be manually tested?

We can check if the call lti.is_role("role-name-here") is possible or not.

Where should the reviewer start?

https://github.com/yuttie/pylti/blob/make-is_role-instance-method/pylti/common.py#L549

Any background context you want to provide?

Since the signature of the method includes self, I believe this method was mistakenly marked as a static method.

@andrT
Copy link

andrT commented Apr 25, 2020

I would also like to see this pull request merged in.

@ttambet
Copy link

ttambet commented Apr 25, 2020

It looks like the mistake got in with commit ffd3d1d for !84 -- it was a real static method before, but self was added as part of that code move and @staticmethod didn't get removed.

Also travis fails, tests are broken. Maybe not so easy to fix because API change?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants