Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
satella
Manage
Activity
Members
Labels
Plan
Issues
1
Issue boards
Milestones
Wiki
Code
Merge requests
0
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
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
public
satella
Commits
3933a1ca
Commit
3933a1ca
authored
2 years ago
by
Piotr Maślanka
Committed by
Piotr Maślanka
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fixes #46
parent
d0d98333
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
satella/coding/__init__.py
+1
-1
1 addition, 1 deletion
satella/coding/__init__.py
satella/coding/overloading.py
+6
-3
6 additions, 3 deletions
satella/coding/overloading.py
tests/test_coding/test_misc.py
+0
-12
0 additions, 12 deletions
tests/test_coding/test_misc.py
with
7 additions
and
16 deletions
satella/coding/__init__.py
+
1
−
1
View file @
3933a1ca
...
@@ -27,7 +27,7 @@ from .deep_compare import assert_equal, InequalityReason, Inequal
...
@@ -27,7 +27,7 @@ from .deep_compare import assert_equal, InequalityReason, Inequal
__all__
=
[
__all__
=
[
'
EmptyContextManager
'
,
'
Context
'
,
'
length
'
,
'
EmptyContextManager
'
,
'
Context
'
,
'
length
'
,
'
assert_equal
'
,
'
InequalityReason
'
,
'
Inequal
'
,
'
assert_equal
'
,
'
InequalityReason
'
,
'
Inequal
'
,
'
Closeable
'
,
'
contains
'
,
'
enum_value
'
,
'
reraise_as
'
'
Closeable
'
,
'
contains
'
,
'
enum_value
'
,
'
expect_exception
'
,
'
expect_exception
'
,
'
overload
'
,
'
class_or_instancemethod
'
,
'
TypeSignature
'
,
'
overload
'
,
'
class_or_instancemethod
'
,
'
TypeSignature
'
,
'
update_if_not_none
'
,
'
DocsFromParent
'
,
'
update_key_if_none
'
,
'
queue_iterator
'
,
'
update_if_not_none
'
,
'
DocsFromParent
'
,
'
update_key_if_none
'
,
'
queue_iterator
'
,
...
...
This diff is collapsed.
Click to expand it.
satella/coding/overloading.py
+
6
−
3
View file @
3933a1ca
from
__future__
import
annotations
from
__future__
import
annotations
import
functools
import
inspect
import
inspect
import
operator
import
typing
as
tp
import
typing
as
tp
from
inspect
import
Parameter
from
satella.coding.structures
import
frozendict
...
@@ -29,9 +34,7 @@ class class_or_instancemethod(classmethod):
...
@@ -29,9 +34,7 @@ class class_or_instancemethod(classmethod):
class
TypeSignature
(
inspect
.
Signature
):
class
TypeSignature
(
inspect
.
Signature
):
"""
Augmented type signature.
"""
__slots__
=
()
__slots__
=
()
def
__init__
(
self
,
t_sign
:
inspect
.
Signature
):
def
__init__
(
self
,
t_sign
:
inspect
.
Signature
):
...
...
This diff is collapsed.
Click to expand it.
tests/test_coding/test_misc.py
+
0
−
12
View file @
3933a1ca
...
@@ -230,18 +230,6 @@ class TestCase(unittest.TestCase):
...
@@ -230,18 +230,6 @@ class TestCase(unittest.TestCase):
self
.
assertEqual
(
a
[
'
type
'
],
'
int
'
)
self
.
assertEqual
(
a
[
'
type
'
],
'
int
'
)
self
.
assertRaises
(
TypeError
,
lambda
:
what_type
(
2.0
))
self
.
assertRaises
(
TypeError
,
lambda
:
what_type
(
2.0
))
def
test_distance
(
self
):
class
A
:
pass
class
B
(
A
):
pass
class
C
(
B
):
pass
self
.
assertEqual
(
distance
(
A
,
C
),
2
)
def
test_update_key_if_not_none
(
self
):
def
test_update_key_if_not_none
(
self
):
a
=
{}
a
=
{}
update_key_if_not_none
(
a
,
'
test
'
,
None
)
update_key_if_not_none
(
a
,
'
test
'
,
None
)
...
...
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