Clean up code and implement best practices #27
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: DGNum/uptime-kuma-api#27
Loading…
Reference in a new issue
No description provided.
Delete branch "best-practices"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Proposed changes
type(a) == list
replaced withisinstance(a, list)
a_dict['key']
replaced witha_dict.get('key')
annotation
-> list
replaced by more accurate-> list[dict]
This module should be compatible with python 3.6.
list[dict]
is not supported in this version:Oh ok I see then I think that we should :
or
Hmm, I noticed that Python 3.6 is end-of-life. Then I think we can just drop support for this version and add
With this import
list[dict]
is supported in Python 3.7 (PEP 563).Thank you!