Page MenuHomeSoftware Heritage

Add type annotations for base_connection
ClosedPublic

Authored by jayeshv on Jul 1 2022, 11:53 AM.

Details

Summary

Remove unnecessary functions in base_connection; properties can
be overridden directly in the sub class

Related to T4261

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 D8065 (id=29102)

Rebasing onto 836eddb72e...

Current branch diff-target is up to date.
Changes applied before test
commit 254e8f55b62e5916171320ab7c3d29d2a3561e70
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Fri Jul 1 11:49:14 2022 +0200

    Add type annotations for base_connection
    
    Remove unnecessary functions in base_connection; properties can
    be overridden directly in the sub class
    
    Related to T4261

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

Add type annotation on _get_paged_result functions

Build is green

Patch application report for D8065 (id=29103)

Rebasing onto 836eddb72e...

Current branch diff-target is up to date.
Changes applied before test
commit e4aeeee8bce206f1b6a6336ca4174a5cd34bdc13
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Fri Jul 1 11:49:14 2022 +0200

    Add type annotations for base_connection
    
    Remove unnecessary functions in base_connection; properties can
    be overridden directly in the sub class
    
    Related to T4261

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

anlambert added inline comments.
swh/graphql/resolvers/base_connection.py
91

Use

:meth:`_get_paged_result`

instead to reference a class method.

swh/graphql/resolvers/origin.py
17

why that change ? it does not seem it is needed.

swh/graphql/resolvers/release.py
41 ↗(On Diff #29103)

same here

swh/graphql/resolvers/revision.py
54

same here

Build is green

Patch application report for D8065 (id=29105)

Rebasing onto 836eddb72e...

Current branch diff-target is up to date.
Changes applied before test
commit e4d4a30b1f3665204404e44f4a79f4235a063f79
Author: Jayesh Velayudhan <jayesh@softwareheritage.org>
Date:   Fri Jul 1 11:49:14 2022 +0200

    Add type annotations for base_connection
    
    Remove unnecessary functions in base_connection; properties can
    be overridden directly in the sub class
    
    Related to T4261

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

This revision is now accepted and ready to land.Jul 1 2022, 2:58 PM
This revision was automatically updated to reflect the committed changes.