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

get_dataclass_data: branch on dataclass vs dataclass instance #832

Merged
merged 1 commit into from
Apr 25, 2022

Conversation

Jasha10
Copy link
Collaborator

@Jasha10 Jasha10 commented Dec 2, 2021

This PR modifies the _utils.get_dataclasses_data function to fix two closely-related bugs, #830 and #831.

Change introduced

  • get_dataclass_data(obj) now branches based on whether its input is a dataclass vs a dataclass instance. This closes #830.
  • get_dataclass_data no-longer branches based on whether the attribute lookup getattr(obj, fieldname) is equal to the missing string "???". This closes #831.

@Jasha10 Jasha10 marked this pull request as ready for review December 2, 2021 09:32
@Jasha10 Jasha10 force-pushed the closes830 branch 2 times, most recently from e670dbb to f787425 Compare April 13, 2022 03:51
@Jasha10 Jasha10 changed the title get_dataclass_data: branch on whether input is dataclass vs dataclass instance get_dataclass_data: branch on dataclass vs dataclass instance Apr 13, 2022
@Jasha10 Jasha10 added this to the OmegaConf 2.2 milestone Apr 16, 2022
@Jasha10 Jasha10 merged commit 240ae71 into omry:master Apr 25, 2022
@Jasha10 Jasha10 deleted the closes830 branch April 25, 2022 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant