Page MenuHomeSoftware Heritage

typing: minimal changes to make a no-op mypy run pass
ClosedPublic

Authored by zack on Sat, Sep 21, 8:43 PM.

Diff Detail

Repository
rDOBJS Object storage
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

zack created this revision.Sat, Sep 21, 8:43 PM
zack updated this revision to Diff 6795.Sat, Sep 21, 8:45 PM
  • typing: convert a swh.objstorage variable annotation to comment style
vlorentz requested changes to this revision.Sat, Sep 21, 9:25 PM
vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/objstorage/api/server.py
9

why?

swh/objstorage/tests/test_objstorage_azure.py
30

It should be a protected attribute

This revision now requires changes to proceed.Sat, Sep 21, 9:25 PM
zack marked an inline comment as done.Sun, Sep 22, 4:02 PM
zack added inline comments.
swh/objstorage/api/server.py
9

The json module is used down in that file, line 129, but the missing import is not flagged by flake8 because the same line, for different reasons (an assigned lambda), has a NoQA marker. The missing import is caught by mypy though, hence I've added the import.

swh/objstorage/tests/test_objstorage_azure.py
30

I'm not sure what you mean here. You want a heading "_" added, a getter, or what?

zack updated this revision to Diff 6810.Tue, Sep 24, 10:49 AM
zack marked 2 inline comments as done.
  • MockBlockBlobService: make data a protected _data attribute
zack added a comment.Tue, Sep 24, 10:49 AM

diff updated, addressing comments

vlorentz accepted this revision.Tue, Sep 24, 10:50 AM
This revision is now accepted and ready to land.Tue, Sep 24, 10:50 AM