Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TypedCols
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
Container 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
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
713
Warden
TypedCols
Merge requests
!8
Fix deprecation warnings
Code
Review changes
Check out branch
Download
Patches
Plain diff
Expand sidebar
Merged
Fix deprecation warnings
hruska-bugfix-#2-deprecation-warnings
into
devel
Overview
0
Commits
1
Pipelines
1
Changes
1
Merged
Rajmund Hruška
requested to merge
hruska-bugfix-#2-deprecation-warnings
into
devel
3 years ago
Overview
0
Commits
1
Pipelines
1
Changes
1
Closes
#2 (closed)
.
0
0
Merge request reports
Compare
devel
devel (base)
and
latest version
latest version
7a1c98b9
1 commit,
3 years ago
1 file
+
8
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
typedcols.py
+
8
−
3
View file @ 7a1c98b9
Edit in single-file editor
Open in Web IDE
Show full file
@@ -13,7 +13,12 @@ type definition.
__version__
=
'
0.1.13
'
__author__
=
'
Pavel Kácha <pavel.kacha@cesnet.cz>
'
import
collections
try
:
# Python 2
from
collections.abc
import
MutableMapping
from
collections.abc
import
MutableSequence
except
ImportError
:
# Python 3
from
collections
import
MutableMapping
from
collections
import
MutableSequence
import
abc
@@ -61,7 +66,7 @@ class TypedDictMetaclass(abc.ABCMeta):
dictify_typedef
(
cls
.
typedef
)
class
TypedDict
(
collections
.
MutableMapping
):
class
TypedDict
(
MutableMapping
):
"""
Dictionary type abstract class, which supports checking of inserted
types, based on simple type definition.
@@ -222,7 +227,7 @@ class TypedDict(collections.MutableMapping):
TypedDict
=
TypedDictMetaclass
(
"
TypedDict
"
,
(
TypedDict
,),
{})
class
TypedList
(
collections
.
MutableSequence
):
class
TypedList
(
MutableSequence
):
"""
List type abstract class, which supports checking of inserted items
type.
Loading