Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
picodata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
picodata
Commits
628d2667
Commit
628d2667
authored
2 years ago
by
Georgy Moshkin
Committed by
Georgy Moshkin
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
fix(test): fix some pyright warnings
parent
f76ac423
No related branches found
No related tags found
1 merge request
!131
fix(test): fix some pyright warnings
Pipeline
#6338
passed
2 years ago
Stage: build
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/int/conftest.py
+3
-6
3 additions, 6 deletions
test/int/conftest.py
with
3 additions
and
6 deletions
test/int/conftest.py
+
3
−
6
View file @
628d2667
...
@@ -167,7 +167,7 @@ class Instance:
...
@@ -167,7 +167,7 @@ class Instance:
return
f
"
Instance(
{
self
.
instance_id
}
, listen=
{
self
.
listen
}
)
"
return
f
"
Instance(
{
self
.
instance_id
}
, listen=
{
self
.
listen
}
)
"
@contextmanager
@contextmanager
def
connect
(
self
,
timeout
:
int
):
def
connect
(
self
,
timeout
:
int
|
float
):
c
=
Connection
(
c
=
Connection
(
self
.
host
,
self
.
host
,
self
.
port
,
self
.
port
,
...
@@ -180,12 +180,12 @@ class Instance:
...
@@ -180,12 +180,12 @@ class Instance:
c
.
close
()
c
.
close
()
@normalize_net_box_result
@normalize_net_box_result
def
call
(
self
,
fn
,
*
args
,
timeout
:
int
=
1
):
def
call
(
self
,
fn
,
*
args
,
timeout
:
int
|
float
=
1
):
with
self
.
connect
(
timeout
)
as
conn
:
with
self
.
connect
(
timeout
)
as
conn
:
return
conn
.
call
(
fn
,
args
)
return
conn
.
call
(
fn
,
args
)
@normalize_net_box_result
@normalize_net_box_result
def
eval
(
self
,
expr
,
*
args
,
timeout
:
int
=
1
):
def
eval
(
self
,
expr
,
*
args
,
timeout
:
int
|
float
=
1
):
with
self
.
connect
(
timeout
)
as
conn
:
with
self
.
connect
(
timeout
)
as
conn
:
return
conn
.
eval
(
expr
,
*
args
)
return
conn
.
eval
(
expr
,
*
args
)
...
@@ -271,9 +271,6 @@ class Instance:
...
@@ -271,9 +271,6 @@ class Instance:
def
remove_data
(
self
):
def
remove_data
(
self
):
rmtree
(
self
.
data_dir
)
rmtree
(
self
.
data_dir
)
def
__hash__
(
self
):
return
hash
(
self
.
id
)
^
hash
(
self
.
cluster_id
)
^
hash
(
self
.
listen
)
def
_raft_status
(
self
)
->
RaftStatus
:
def
_raft_status
(
self
)
->
RaftStatus
:
status
=
self
.
call
(
"
picolib.raft_status
"
)
status
=
self
.
call
(
"
picolib.raft_status
"
)
assert
isinstance
(
status
,
dict
)
assert
isinstance
(
status
,
dict
)
...
...
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