Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 typing: better type hints, increased type safety, mypy support #534
Improve typing: better type hints, increased type safety, mypy support #534
Changes from 28 commits
fe6b219
bc06f0d
43fa478
ad65877
240b600
45eac47
7e4cf7b
587be34
e793052
9f367c0
b8c4cb1
f4d62d2
50fde43
97bc6aa
b992ab3
7a788cd
26c32c5
e6f9124
e780672
38aef21
2bdc902
ccad60b
a5f23c0
8ae929c
19f023c
1846945
ca4e844
6204d4c
44aa867
955c018
58535b8
5ccb35f
18a533f
c2786cf
4c0a073
44d7130
af55ab2
9d320bd
e68e32c
b062d47
49cb014
a332025
2de6d8a
baa6512
4679dfd
73bd012
1ecc300
970931a
02a4aa5
34dbef6
f16f924
ba00b40
b4fd47d
19227c2
a601567
b7d4364
3ca3bf2
bda08cb
276dfaa
3171a8b
479b2f1
a52c4a3
fb72cf6
1cbf645
f7443cb
8dd12a7
2bdc4b3
8e46bae
163013e
3dcfae7
8f5a137
89ba88c
5f3273b
6af437d
852cfb1
9e1622d
2e8b1f0
32898c3
76eb8bb
0a1b06a
58eed54
8c1655e
59cff9d
74b90da
54eb44c
ced18b2
cbc7062
d518762
4804f69
dcf80a8
cee0c46
25aa308
fb7caff
b23b42d
56761d6
7e87d40
e1e09fd
9bd0ff0
42d1e97
d0e58aa
4117a8f
908925a
fc1696e
16c440e
2c18c7e
831bfe4
3fa312b
d00b4d6
c1d7d12
e456bb7
52b71cd
a23fd29
f35b222
8989c4b
2e54951
1d001d3
71b29d7
89197d0
d1d12d5
d8d355f
7ba6dc6
024ca75
fca8624
4923f59
44bb66c
7f6f36b
849d70a
2639fd1
cca71d0
b888f13
e56c0e3
939c52f
da5c038
9652189
e0f59df
e53dbcc
b7e44cb
3c58cb0
1e3f10b
7541784
765aa3f
568446b
1aacc95
630f2e1
4f3fea5
a2a459b
e5bad0b
1352bf7
7abd9f5
94e9705
617444e
d1eebbb
5dd02aa
db7dc22
e69bd78
f4f14f0
6364dc3
9025b5d
146979b
5a19b8e
ebc3138
9e2e3c4
28991da
9b67ae3
d650712
9f50e3b
2a4d541
4526e33
d0920ce
8b63ed9
cc2d752
77f672d
0edb9b6
92972f2
09eb309
8780d08
9a66f0f
3d0db4b
6f9ff97
f8d6dbd
589b0b7
c3668fc
0fccd63
487bcc7
c758243
6921336
bc41787
609c4d0
445f57d
707ba66
b4f3cd6
f839021
b75478f
cc2d587
4232b45
872f6b8
de3c397
e87d2c5
57b5904
a60afee
bf298f1
ffb82cc
eb26516
86a5534
71886db
7bc0935
586046f
4620ef6
a184971
07067f0
b7bfdb4
6e0dbb1
71557f6
f935873
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
There's a slight semantic change here which I think wasn't intended. Previously you were OK with
"field" not in cell"
-- but now for outputs/metadata you add the default. This has caused the notebooks to have"outputs": []
even for text entries that don't usually produce any output.Probably want to change this to something like
if field in cell and cell.get(field) != default
? Or have a list of permissible values as well as defaults, like:where you could include
None
inallowed
for"outputs"
even while keeping[]
as the default.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.
I think the "correct" way to format is to have an empty list for code cells, no entry for any other cell. Not sure if the best way to do this is by allowing different defaults by different cell types. What you're suggesting achieves the same result when using a notebook executor because md cells never add the "outputs" key, but it would not roll it back automatically from e.g. the state it is now.
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.
Came up with a solution for this, it is somewhat different to what we've discussed, let me know if you want to take a look before I merge.