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

Improve the OECD requests #6152

Merged
merged 18 commits into from
Mar 1, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
lint
jmaslek committed Feb 29, 2024
commit beceaa68cbe280a9567053a8a4b3848b60d9cb62
Original file line number Diff line number Diff line change
@@ -102,7 +102,7 @@ def extract_data(
]
data_df["date"] = data_df["date"].apply(
lambda x: x.year
) # Validator wont accept datetime.date?
) # Validator won't accept datetime.date?
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is because the validator is expecting a string representation. Although, because you have already conformed the date field in the extract process, the validator is now redundant.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought that too but it accepts str|date so it was unclear what was actually going wrong

return data_df.to_dict(orient="records")

@staticmethod
Original file line number Diff line number Diff line change
@@ -87,7 +87,7 @@ def extract_data(
]
data_df["date"] = data_df["date"].apply(
lambda x: x.year
) # Validator wont accept datetime.date?
) # Validator won't accept datetime.date?
return data_df.to_dict(orient="records")

@staticmethod