Page MenuHomeSoftware Heritage

Improve doc strings and inline documentation
ClosedPublic

Authored by jayeshv on Jun 1 2022, 5:51 PM.

Diff Detail

Repository
rDGQL GraphQL API
Branch
doc-cleanup
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 29686
Build 46394: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 46393: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D7942 (id=28603)

Rebasing onto c8ef46e760...

Current branch diff-target is up to date.
Changes applied before test
commit 8accb28a366248fc8741d7d8d1127182573091fa
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Tue May 31 14:04:50 2022 +0200

    Improve doc strings and inline documentation
    
    Related to T4261

See https://jenkins.softwareheritage.org/job/DGQL/job/tests-on-diff/38/ for more details.

Build is green

Patch application report for D7942 (id=28604)

Rebasing onto c8ef46e760...

Current branch diff-target is up to date.
Changes applied before test
commit 93ceb8cb3deb9f0ead66b9111a79eb35fbed1cc6
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Tue May 31 14:04:50 2022 +0200

    Improve doc strings and inline documentation
    
    Related to T4261

See https://jenkins.softwareheritage.org/job/DGQL/job/tests-on-diff/39/ for more details.

vlorentz requested changes to this revision.Jun 1 2022, 6:22 PM
vlorentz added a subscriber: vlorentz.

some comments below for the first files in the diff, but they apply to others too

swh/graphql/resolvers/content.py
49–50

redundant

swh/graphql/resolvers/directory.py
48

add a type annotation instead

49

s/required/requested/ ?

60–61

ditto

swh/graphql/resolvers/directory_entry.py
31

would an annotation work here too?

swh/graphql/resolvers/resolvers.py
12
This revision now requires changes to proceed.Jun 1 2022, 6:22 PM

Build is green

Patch application report for D7942 (id=28605)

Rebasing onto c8ef46e760...

Current branch diff-target is up to date.
Changes applied before test
commit 418b121b4d5aa34b745c1e523bb6eb0a128bb829
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Tue May 31 14:04:50 2022 +0200

    Improve doc strings and inline documentation
    
    Add type hints for parent objects in a resolver
    
    Related to T4261

See https://jenkins.softwareheritage.org/job/DGQL/job/tests-on-diff/40/ for more details.

jayeshv marked 5 inline comments as done.

Type hint update

Build is green

Patch application report for D7942 (id=28606)

Rebasing onto c8ef46e760...

Current branch diff-target is up to date.
Changes applied before test
commit f00e0fd49273095c9576d42b8c11122ead974e1b
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Tue May 31 14:04:50 2022 +0200

    Improve doc strings and inline documentation
    
    Add type hints for parent objects in a resolver
    
    Related to T4261

See https://jenkins.softwareheritage.org/job/DGQL/job/tests-on-diff/41/ for more details.

vlorentz added inline comments.
swh/graphql/resolvers/directory.py
60–61

I still feel "obj.targetHash is the requested directory id" is redundant when the next line clearly gets a directory with that id

swh/graphql/resolvers/directory_entry.py
31

you can remove the comment now

This revision is now accepted and ready to land.Jun 2 2022, 3:45 PM

Remove unnecessary comments

Build is green

Patch application report for D7942 (id=28622)

Rebasing onto c8ef46e760...

Current branch diff-target is up to date.
Changes applied before test
commit 267732ffffefbc569fcc31af04c9825b60bf3ff3
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Tue May 31 14:04:50 2022 +0200

    Improve doc strings and inline documentation
    
    Add type hints for parent objects in a resolver
    
    Related to T4261

See https://jenkins.softwareheritage.org/job/DGQL/job/tests-on-diff/42/ for more details.