Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
perxis-python
Manage
Activity
Members
Plan
Custom issue tracker
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
perxis
perxis-python
Commits
934180ef
Commit
934180ef
authored
6 months ago
by
teplyakov
Browse files
Options
Downloads
Patches
Plain Diff
feat:
AUTO-3805
CollectionProps type
parent
5725a6cc
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
perxis/collections/helpers.py
+14
-7
14 additions, 7 deletions
perxis/collections/helpers.py
with
14 additions
and
7 deletions
perxis/collections/helpers.py
+
14
−
7
View file @
934180ef
from
perxis.collections
import
collections_pb2
from
typing
import
TypedD
ict
from
dataclasses
import
dataclass
,
asd
ict
from
typing_extensions
import
deprecated
...
...
@@ -22,11 +22,18 @@ def make_collection_instances(
return
collections
class
CollectionProps
(
TypedDict
):
single
:
bool
system
:
bool
no_data
:
bool
hidden
:
bool
@dataclass
class
CollectionProps
:
single
:
bool
=
False
system
:
bool
=
False
no_data
:
bool
=
False
hidden
:
bool
=
False
no_revisions
:
bool
=
False
no_archive
:
bool
=
False
no_publish
:
bool
=
False
def
to_dict
(
self
)
->
dict
:
return
asdict
(
self
)
# noqa
def
init_collections
(
...
...
@@ -41,7 +48,7 @@ def init_collections(
collection_schema
=
file
.
read
()
kwargs
=
{
**
(
collections_settings_mapping
.
get
(
collection_id
)
or
{}
),
**
(
collections_settings_mapping
.
get
(
collection_id
)
.
to_dict
()
),
"
id
"
:
collection_id
,
"
name
"
:
collection_name
,
"
schema
"
:
collection_schema
,
...
...
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