Page MenuHomeSoftware Heritage

sourceforge lister: Fix type
ClosedPublic

Authored by ardumont on Nov 23 2021, 10:15 AM.

Details

Reviewers
vlorentz
Group Reviewers
Reviewers
Commits
rDLS3ffea8f525cd: lister: Fix type
Summary
Test Plan

tox

Diff Detail

Repository
rDLS Listers
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 D6666 (id=24231)

Rebasing onto 97553d8984...

Current branch diff-target is up to date.
Changes applied before test
commit 3ffea8f525cdd6bfc0df8ff526bf4622ca66787a
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Tue Nov 23 10:13:19 2021 +0100

    lister: Fix type
    
    This fixes the master build [1]
    
    [1] https://jenkins.softwareheritage.org/view/swh-draft/job/DLS/job/tests/1625/console

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

ardumont retitled this revision from lister: Fix type to sourceforge lister: Fix type.Nov 23 2021, 10:20 AM
swh/lister/sourceforge/lister.py
46

mypy is right, last_modified is a date and iso8601.parse_date takes a date as string... [1]
Hence the change below.

[1] https://github.com/micktwomey/pyiso8601/blob/main/iso8601/iso8601.py#L102-L104

vlorentz added inline comments.
swh/lister/sourceforge/lister.py
250–251

Does this work? It spares a serialization/deserialization round-trip

This revision is now accepted and ready to land.Nov 23 2021, 10:32 AM
swh/lister/sourceforge/lister.py
250–251

Interesting, i did not knew that datetime.combine [1]

I've opened D6668 with that implementation so we have some clue.

[1] https://docs.python.org/3.7/library/datetime.html#datetime.datetime.combine

swh/lister/sourceforge/lister.py
250–251

Does this work?

D6668's build says no.

This revision was automatically updated to reflect the committed changes.