Closed thraxil closed 2 years ago
Options would be to either add a self
, so it's a proper method, make it a staticmethod
, or just pull it out of the class so it's a regular function.
Thanks @thraxil Great catch. I created #31
FWIW: if you put a message like "closes #30" in the git commit comment or the PR description, github will automatically link it back to this issue and close the issue when the PR is merged.
Thanks, I closed the PR before seeing your message, will try it for the next issue
The
is_valid_url()
method: https://github.com/appsembler/xblock-grade-fetcher/blob/master/gradefetcher/gradefetcher.py#L200Has the signature:
There's no
self
as a first argument. That means that any subsequent calls as a method, like https://github.com/appsembler/xblock-grade-fetcher/blob/master/gradefetcher/gradefetcher.py#L321 or https://github.com/appsembler/xblock-grade-fetcher/blob/master/gradefetcher/gradefetcher.py#L360Will always fail with
TypeError: is_valid_url() takes 1 positional argument but 2 were given
.