Page MenuHomeSoftware Heritage

Improve doc strings and inline documentation
ClosedPublic

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

Diff Detail

Repository
rDGQL GraphQL API
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

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.Wed, Jun 1, 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
54–55

redundant

swh/graphql/resolvers/directory.py
51

add a type annotation instead

51

s/required/requested/ ?

61–62

ditto

swh/graphql/resolvers/directory_entry.py
31

would an annotation work here too?

swh/graphql/resolvers/resolvers.py
11
This revision now requires changes to proceed.Wed, Jun 1, 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
61–62

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.Thu, Jun 2, 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.