Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
SaQC
Manage
Activity
Members
Labels
Plan
Issues
36
Issue boards
Milestones
Wiki
Code
Merge requests
8
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
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
rdm-software
SaQC
Commits
7d6b3084
Commit
7d6b3084
authored
4 years ago
by
Bert Palm
🎇
Browse files
Options
Downloads
Patches
Plain Diff
CompatFlagger now inherits from BaseFlagger
parent
94059777
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!218
Flags
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
saqc/flagger/compatflagger.py
+14
-18
14 additions, 18 deletions
saqc/flagger/compatflagger.py
with
14 additions
and
18 deletions
saqc/flagger/compatflagger.py
+
14
−
18
View file @
7d6b3084
...
...
@@ -13,27 +13,23 @@ import numpy as np
from
saqc.common
import
*
from
saqc.lib.tools
import
assertScalar
,
mergeDios
,
toSequence
,
customRoller
from
saqc.flagger.flags
import
Flags
,
init_flags_like
,
History
from
saqc.flagger.baseflagger
import
(
BaseFlagger
,
COMPARATOR_MAP
,
LocT
,
FlagT
,
PandasT
,
FieldsT
,
)
COMPARATOR_MAP
=
{
"
!=
"
:
op
.
ne
,
"
==
"
:
op
.
eq
,
"
>=
"
:
op
.
ge
,
"
>
"
:
op
.
gt
,
"
<=
"
:
op
.
le
,
"
<
"
:
op
.
lt
,
}
LocT
=
Union
[
pd
.
Series
,
pd
.
Index
,
slice
]
FlagT
=
Any
BaseFlaggerT
=
TypeVar
(
"
BaseFlaggerT
"
,
bound
=
"
BaseFlagger
"
)
PandasT
=
Union
[
pd
.
Series
,
DictOfSeries
]
FieldsT
=
Union
[
str
,
List
[
str
],
slice
]
class
CompatFlagger
:
class
CompatFlagger
(
BaseFlagger
):
def
__init__
(
self
):
self
.
dtype
=
float
super
().
__init__
(
float
)
# not supported anymore
delattr
(
self
,
'
extra_defaults
'
)
# the arguments of setFlags supported from the configuration functions
self
.
signature
=
(
"
flag
"
,
"
force
"
,
"
flag_after
"
,
"
flag_before
"
)
...
...
@@ -375,7 +371,7 @@ class CompatFlagger:
return
flagged
def
copy
(
self
)
->
CompatFlagger
:
def
copy
(
self
,
**
kwargs
)
->
CompatFlagger
:
copy
=
self
.
_constructor
()
copy
.
_flags
=
self
.
_flags
.
copy
(
deep
=
True
)
return
copy
...
...
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