Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
Metadata indexer
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
Package Registry
Model registry
Operate
Environments
Terraform modules
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
vlorentz
Metadata indexer
Commits
a2b39603
Commit
a2b39603
authored
3 years ago
by
Kartik Ohri
Committed by
Phabricator Migration user
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Fix mypy issues
parent
d1924d32
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
swh/indexer/metadata_dictionary/__init__.py
+2
-1
2 additions, 1 deletion
swh/indexer/metadata_dictionary/__init__.py
swh/indexer/metadata_dictionary/cff.py
+3
-3
3 additions, 3 deletions
swh/indexer/metadata_dictionary/cff.py
with
5 additions
and
4 deletions
swh/indexer/metadata_dictionary/__init__.py
+
2
−
1
View file @
a2b39603
import
collections
from
typing
import
DefaultDict
,
Dict
,
Final
,
Set
,
Type
from
typing
import
DefaultDict
,
Dict
,
Set
,
Type
import
click
from
typing_extensions
import
Final
from
.
import
cff
,
codemeta
,
maven
,
npm
,
python
,
ruby
from
.base
import
BaseMapping
...
...
This diff is collapsed.
Click to expand it.
swh/indexer/metadata_dictionary/cff.py
+
3
−
3
View file @
a2b39603
from
typing
import
Dict
,
List
,
Optional
from
typing
import
Any
,
Dict
,
List
,
Optional
import
yaml
...
...
@@ -32,14 +32,14 @@ class CffMapping(DictMapping, SingleFileMapping):
def
normalize_authors
(
self
,
d
)
->
Authors
:
result
:
List
[
Author
]
=
[]
for
author
in
d
:
author_data
=
{
"
@type
"
:
SCHEMA_URI
+
"
Person
"
}
author_data
:
Dict
[
str
,
Any
]
=
{
"
@type
"
:
SCHEMA_URI
+
"
Person
"
}
if
"
orcid
"
in
author
:
author_data
[
"
@id
"
]
=
author
[
"
orcid
"
]
if
"
affiliation
"
in
author
:
author_data
[
SCHEMA_URI
+
"
affiliation
"
]
=
{
"
@type
"
:
SCHEMA_URI
+
"
Organization
"
,
SCHEMA_URI
+
"
name
"
:
author
[
"
affiliation
"
],
}
# type: ignore
}
if
"
family-names
"
in
author
:
author_data
[
SCHEMA_URI
+
"
familyName
"
]
=
author
[
"
family-names
"
]
if
"
given-names
"
in
author
:
...
...
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