Page MenuHomeSoftware Heritage

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

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

Diff Detail

Repository
rDOBJS Object storage
Branch
feature/typing
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 7905
Build 11378: tox-on-jenkinsJenkins
Build 11377: arc lint + arc unit

Event Timeline

  • typing: convert a swh.objstorage variable annotation to comment style
vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/objstorage/api/server.py
8

why?

swh/objstorage/tests/test_objstorage_azure.py
30

It should be a protected attribute

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

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 marked 2 inline comments as done.
  • MockBlockBlobService: make data a protected _data attribute

diff updated, addressing comments

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