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

Improvement: Refactor code to use dict.get() method #242

Open
4 tasks
codesankalp opened this issue Mar 29, 2021 · 2 comments
Open
4 tasks

Improvement: Refactor code to use dict.get() method #242

codesankalp opened this issue Mar 29, 2021 · 2 comments
Labels
Category: Coding Changes to code base or refactored code that doesn't fix a bug. hacktoberfest Status: Available Issue was approved and available to claim or abandoned for over 3 days. Type: Enhancement New feature or request.
Projects

Comments

@codesankalp
Copy link
Member

Description

As a developer,
I need code to be consistent and error-free.

Mocks

def validate_update_program(data):
email = data["contact_email"]
if not email:

For example this can be replaced by the get method i.e. data.get("KEY", "DEFAULT_VALUE") to avoid KeyError

Acceptance Criteria

Update [Required]

  • Use get method in all code to avoid the raise of KeyError.
  • Handle exceptions for default value.

Definition of Done

  • All of the required items are completed.
  • Approval by 1 mentor.

Estimation

2 hours

@codesankalp codesankalp added Category: Coding Changes to code base or refactored code that doesn't fix a bug. Open Source Hack Status: Available Issue was approved and available to claim or abandoned for over 3 days. Type: Enhancement New feature or request. labels Mar 29, 2021
@mtreacy002 mtreacy002 added this to Icebox in BIT Roadmap Apr 4, 2021
@Anmollenka
Copy link
Contributor

I would like to work on this issue.

@isabelcosta
Copy link
Member

@Anmollenka are you still interested? I only saw your message now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Coding Changes to code base or refactored code that doesn't fix a bug. hacktoberfest Status: Available Issue was approved and available to claim or abandoned for over 3 days. Type: Enhancement New feature or request.
Projects
BIT Roadmap
New Issues
Development

No branches or pull requests

4 participants