oarepo-runtime 1.6.0__py3-none-any.whl → 1.6.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
oarepo_runtime/config.py CHANGED
@@ -1,15 +1,19 @@
1
- from typing import cast
1
+ from typing import Any, cast
2
2
 
3
3
  from flask import Flask
4
4
 
5
5
 
6
- def build_config[T: type](config_class: T, app: Flask) -> T:
6
+ def build_config[T: type](config_class: T, app: Flask, *args: Any, **kwargs: Any) -> T:
7
7
  """
8
8
  Builds the configuration for the service
9
9
 
10
10
  This function is used to build the configuration for the service
11
11
  """
12
12
  if hasattr(config_class, "build") and callable(config_class.build):
13
+ if args or kwargs:
14
+ raise ValueError(
15
+ "Can not pass extra arguments when invenio ConfigMixin is used"
16
+ )
13
17
  return cast(T, config_class.build(app))
14
18
  else:
15
- return config_class()
19
+ return config_class(*args, **kwargs)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oarepo-runtime
3
- Version: 1.6.0
3
+ Version: 1.6.1
4
4
  Summary: A set of runtime extensions of Invenio repository
5
5
  Description-Content-Type: text/markdown
6
6
  License-File: LICENSE
@@ -1,5 +1,5 @@
1
1
  oarepo_runtime/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- oarepo_runtime/config.py,sha256=n9ZEDL0kKd1AkrQUJ-dl0iekUJJienppDI2gYPkfK6Q,403
2
+ oarepo_runtime/config.py,sha256=nf3hqcldk4-ixswZqIDHgX3EvNRiOlNdkavPz_RUkqw,601
3
3
  oarepo_runtime/ext.py,sha256=6w6bpTpNjjj3txgVu0nfpmPa9CnDS6Zl6U2DCNs9Usc,2565
4
4
  oarepo_runtime/ext_config.py,sha256=ERpi6uJqDE6OpqebB_vuusmoB3xaAziuKeGVxVI5Q-w,2155
5
5
  oarepo_runtime/profile.py,sha256=QzrQoZncjoN74ZZnpkEKakNk08KCzBU7m6y42RN8AMY,1637
@@ -149,13 +149,13 @@ oarepo_runtime/translations/en/LC_MESSAGES/messages.po,sha256=7-5S3iINOSFSI5gVdR
149
149
  oarepo_runtime/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
150
150
  oarepo_runtime/utils/functools.py,sha256=gKS9YZtlIYcDvdNA9cmYO00yjiXBYV1jg8VpcRUyQyg,1324
151
151
  oarepo_runtime/utils/path.py,sha256=V1NVyk3m12_YLbj7QHYvUpE1wScO78bYsX1LOLeXDkI,3108
152
- oarepo_runtime-1.6.0.dist-info/licenses/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
152
+ oarepo_runtime-1.6.1.dist-info/licenses/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
153
153
  tests/marshmallow_to_json/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
154
154
  tests/marshmallow_to_json/test_datacite_ui_schema.py,sha256=82iLj8nW45lZOUewpWbLX3mpSkpa9lxo-vK-Qtv_1bU,48552
155
155
  tests/marshmallow_to_json/test_simple_schema.py,sha256=izZN9p0v6kovtSZ6AdxBYmK_c6ZOti2_z_wPT_zXIr0,1500
156
156
  tests/pkg_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
157
- oarepo_runtime-1.6.0.dist-info/METADATA,sha256=WIPIVNqe7zXtEAYSQEBCbFLsYhiuadkxiw4Yymximzs,4741
158
- oarepo_runtime-1.6.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
159
- oarepo_runtime-1.6.0.dist-info/entry_points.txt,sha256=k7O5LZUOGsVeSpB7ulU0txBUNp1CVQG7Q7TJIVTPbzU,491
160
- oarepo_runtime-1.6.0.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
161
- oarepo_runtime-1.6.0.dist-info/RECORD,,
157
+ oarepo_runtime-1.6.1.dist-info/METADATA,sha256=GTA-xYl3Qm6Vi1tcxkLv35HwBnSw3p8oHon-rp2_d7o,4741
158
+ oarepo_runtime-1.6.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
159
+ oarepo_runtime-1.6.1.dist-info/entry_points.txt,sha256=k7O5LZUOGsVeSpB7ulU0txBUNp1CVQG7Q7TJIVTPbzU,491
160
+ oarepo_runtime-1.6.1.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
161
+ oarepo_runtime-1.6.1.dist-info/RECORD,,