-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: ♻️ rename to properties in read_json()
#169
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
base: main
Are you sure you want to change the base?
Conversation
|
I messed up, this has commits from another PR. Will wait until that one is merged before converting this one to be ready for review. |
|
Sorry, are you waiting on me for this? |
…package into refactor/rename-to-properties-in-read-json
|
@martonvago yes! Or someone 😛 |
martonvago
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!!
| """ | ||
| try: | ||
| descriptor: Any = loads(path.read_text()) | ||
| properties: dict[str, Any] = loads(path.read_text()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the return type of loads is Any, right? So we can't assert here that it's a dict. (That's why we are checking it later on.)
| properties: dict[str, Any] = loads(path.read_text()) | |
| properties: Any = loads(path.read_text()) |
| ) from None # To hide the original traceback | ||
|
|
||
| if not isinstance(descriptor, dict): | ||
| if not isinstance(properties, dict): # pyright: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if not isinstance(properties, dict): # pyright: ignore | |
| if not isinstance(properties, dict): |
Or what is it complaining about?
Description
Very small fix to use
propertiesinread_json().Needs a quick review.
Checklist
just run-all