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

Deprecated method set_img_src (wrong functionality) #8

Open
mwd1993 opened this issue Oct 15, 2022 · 0 comments
Open

Deprecated method set_img_src (wrong functionality) #8

mwd1993 opened this issue Oct 15, 2022 · 0 comments

Comments

@mwd1993
Copy link
Owner

mwd1993 commented Oct 15, 2022

def set_img_src(self, _str):

This method actually tries to set a link, so the functionality of the method is wrong.
Also, we need to update the method doc to let users know this method is Deprecated

Should change the method from:

def set_img_src(self, _str):
            """
            Sets an images source (external url or local url)
            returns: self
            """
            self.add_attribute('src="' + _str + '"')
            return 

To this:

def set_img_src(self, _str):
            """
            (Deprecated - use set_img_background instead)
            Sets an images background
            returns: self
            """
            self.set_img_background(_str)
            return 

Simply rerouting it to the real method 'set_img_background' (though set_img_src is deprecated, we will be keeping it for backwards compatibility)

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

No branches or pull requests

1 participant