Skip to content

Commit 7919fc9

Browse files
committed
Adapt user.py
1 parent bb5bb66 commit 7919fc9

File tree

2 files changed

+30
-3
lines changed

2 files changed

+30
-3
lines changed

Diff for: python/hopsworks_common/user.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
1617
from __future__ import annotations
1718

1819
import json
1920

2021
import humps
21-
from hsfs import util
22+
from hopsworks_common import util
2223

2324

2425
class User:
@@ -40,12 +41,14 @@ def __init__(
4041
user_account_type=None,
4142
num_active_projects=None,
4243
num_remaining_projects=None,
44+
firstname=None,
45+
lastname=None,
4346
**kwargs,
4447
):
4548
self._username = username
4649
self._email = email
47-
self._first_name = first_name
48-
self._last_name = last_name
50+
self._first_name = first_name or firstname
51+
self._last_name = last_name or last_name
4952
self._status = status
5053
self._secret = secret
5154
self._chosen_password = chosen_password

Diff for: python/hsfs/user.py

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#
2+
# Copyright 2022 Logical Clocks AB
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
17+
from hopsworks_common.user import (
18+
User,
19+
)
20+
21+
22+
__all__ = [
23+
User,
24+
]

0 commit comments

Comments
 (0)