mirror of
https://github.com/LCPQ/QUESTDB_website.git
synced 2024-12-26 06:14:38 +01:00
Fix bugs in data python library
This commit is contained in:
parent
99cb672fd1
commit
024b284386
@ -53,7 +53,7 @@ class exSet(object):
|
|||||||
self.index=index
|
self.index=index
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f"{self.name},${self.index}"
|
return f"{self.name},{self.index}"
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def fromString(string):
|
def fromString(string):
|
||||||
@ -66,12 +66,12 @@ class exSet(object):
|
|||||||
yamlpath=Path(__file__)/"../../statics/data/index.yaml"
|
yamlpath=Path(__file__)/"../../statics/data/index.yaml"
|
||||||
with yamlpath.open("r") as f:
|
with yamlpath.open("r") as f:
|
||||||
db = yaml.load(f,yaml.loader.FullLoader)
|
db = yaml.load(f,yaml.loader.FullLoader)
|
||||||
sets=db[sets]
|
sets=db["sets"]
|
||||||
if self.name in db["sets"]:
|
if self.name in db["sets"]:
|
||||||
return sets[this.name][this.index]
|
return sets[self.name][self.index]
|
||||||
|
|
||||||
def isSameSet(self,otherSet):
|
def isSameSet(self,otherSet):
|
||||||
return this.name == otherSet.name
|
return self.name == otherSet.name
|
||||||
|
|
||||||
def isSameArticle(self,otherSet):
|
def isSameArticle(self,otherSet):
|
||||||
if (self.name==otherSet.name and self.index==otherSet.index):
|
if (self.name==otherSet.name and self.index==otherSet.index):
|
||||||
|
Loading…
Reference in New Issue
Block a user