Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swh-lister
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Platform
Development
swh-lister
Commits
4b3a12fe
Verified
Commit
4b3a12fe
authored
1 month ago
by
Antoine Lambert
Browse files
Options
Downloads
Patches
Plain Diff
maven, sourceforge: Fix mypy errors
parent
edef3b85
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!547
Apply swh-py-template v0.3.3 with copier
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
swh/lister/maven/lister.py
+2
-2
2 additions, 2 deletions
swh/lister/maven/lister.py
swh/lister/sourceforge/lister.py
+3
-3
3 additions, 3 deletions
swh/lister/sourceforge/lister.py
with
5 additions
and
5 deletions
swh/lister/maven/lister.py
+
2
−
2
View file @
4b3a12fe
...
...
@@ -11,7 +11,7 @@ from typing import Any, Dict, Iterator, Optional
from
urllib.parse
import
urljoin
from
bs4
import
BeautifulSoup
import
lxml
from
lxml
import
etree
import
requests
from
swh.scheduler.interface
import
SchedulerInterface
...
...
@@ -247,7 +247,7 @@ class MavenLister(Lister[MavenListerState, RepoPage]):
"
POM info page could not be fetched, skipping project
'
%s
'"
,
pom_url
,
)
except
lxml
.
etree
.
Error
as
error
:
except
etree
.
Error
as
error
:
logger
.
info
(
"
Could not parse POM %s XML: %s.
"
,
pom_url
,
error
)
def
get_scm
(
self
,
page
:
RepoPage
)
->
Optional
[
ListedOrigin
]:
...
...
This diff is collapsed.
Click to expand it.
swh/lister/sourceforge/lister.py
+
3
−
3
View file @
4b3a12fe
...
...
@@ -13,7 +13,7 @@ from xml.etree import ElementTree
from
bs4
import
BeautifulSoup
import
iso8601
import
lxml
from
lxml
import
etree
import
requests
from
swh.core.api.classes
import
stream_results
...
...
@@ -402,8 +402,8 @@ class SourceForgeLister(Lister[SourceForgeListerState, SourceForgeListerPage]):
# If a bzr project has multiple branches, we need to extract their
# names from the repository landing page and create one listed origin
# per branch
parser
=
lxml
.
etree
.
HTMLParser
()
tree
=
lxml
.
etree
.
fromstring
(
response
.
text
,
parser
)
parser
=
etree
.
HTMLParser
()
tree
=
etree
.
fromstring
(
response
.
text
,
parser
)
# Get all tds with class 'autcell'
tds
=
tree
.
xpath
(
"
.//td[contains(@class,
'
autcell
'
)]
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment