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

Checking for handling of "success" return values #6

Open
kannes opened this issue Sep 25, 2023 · 1 comment
Open

Checking for handling of "success" return values #6

kannes opened this issue Sep 25, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@kannes
Copy link

kannes commented Sep 25, 2023

Is there a chance to mark methods that return success status booleans or objects if the user does not check them? E. g.:

QgsProject.addMapLayer returns either the added layer or None. The user should check that.

QgsProject.commitChanges returns Tuple[bool, List[str]]. The user should check that boolean.

@kannes kannes added the enhancement New feature or request label Sep 25, 2023
@Joonalai
Copy link
Contributor

Joonalai commented Sep 27, 2023

Thank you for the issue and for the great idea. I think that the methods should be listed and divided into two categories: possible errors and probable errors. There should be at least two new codes based on those.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants