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

if a key is missing, report with a KeyError in AttrDict #16

Merged
merged 1 commit into from
Mar 7, 2024

Conversation

aerorahul
Copy link
Contributor

Description

When a key is missing in a AttrDict, raise a KeyError consistent with dict.

Fixes #14

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

  • pynorms
  • pytests

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes need updates to the documentation. I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • New and existing tests pass with my changes
  • Any dependent changes have been merged and published

Copy link

codecov bot commented Mar 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.08%. Comparing base (dd9ca24) to head (91903a1).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #16      +/-   ##
===========================================
+ Coverage    48.87%   49.08%   +0.21%     
===========================================
  Files           15       15              
  Lines         1416     1416              
  Branches       308      308              
===========================================
+ Hits           692      695       +3     
+ Misses         670      667       -3     
  Partials        54       54              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

@AndrewEichmann-NOAA AndrewEichmann-NOAA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks reasonable

@aerorahul aerorahul merged commit a99775c into develop Mar 7, 2024
17 checks passed
@aerorahul aerorahul deleted the bugfix/issue-14 branch March 7, 2024 14:41
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

Successfully merging this pull request may close these issues.

AttrDict returns empty AttrDict when key does not exist
2 participants