-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extended FSWTabDict class #377
base: master
Are you sure you want to change the base?
Changes from 1 commit
eacbb9f
a6dd09c
9fbae8b
763ce15
7def8d4
b0daf40
3ed3b43
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,6 @@ class FSWColDefn(object): | |
|
||
Argument Definitions encapsulate all information required to define | ||
a single column. | ||
|
||
""" | ||
|
||
def __init__(self, *args, **kwargs): | ||
|
@@ -434,7 +433,7 @@ def create(self, name, *args): | |
tab = None | ||
defn = self.get(name, None) | ||
if defn: | ||
tab = createFSWTab(defn, *args) | ||
tab = FSWTab(defn, *args) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, my comment from last review was incorrect. The |
||
return tab | ||
|
||
def load(self, filename): | ||
|
@@ -468,7 +467,7 @@ def dirty(self): | |
def load(self): | ||
if self.fswtabdict is None: | ||
if self.dirty(): | ||
self.fswtabdict = createFSWTabDict(self.filename) | ||
self.fswtabdict = FSWTabDict(self.filename) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, my comment from last review was incorrect. The |
||
self.update() | ||
else: | ||
with open(self.pcklname, "rb") as stream: | ||
|
@@ -504,14 +503,14 @@ def getDefaultDict(): # noqa: N802 | |
|
||
def YAMLCtor_FSWColDefn(loader, node): # noqa: N802 | ||
fields = loader.construct_mapping(node, deep=True) | ||
return createFSWColDefn(**fields) | ||
return FSWColDefn(**fields) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, my comment from last review was incorrect. The |
||
|
||
|
||
def YAMLCtor_FSWTabDefn(loader, node): # noqa: N802 | ||
fields = loader.construct_mapping(node, deep=True) | ||
fields['fswheaderdefns'] = fields.pop('header', None) | ||
fields['coldefns'] = fields.pop('columns', None) | ||
return createFSWTabDefn(**fields) | ||
fields["fswheaderdefns"] = fields.pop("header", None) | ||
fields["coldefns"] = fields.pop("columns", None) | ||
return FSWTabDefn(**fields) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, my comment from last review was incorrect. The There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, I made the changes back and update utll.py |
||
|
||
|
||
def encode_to_file(tbl_type, in_path, out_path): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overwrites previous definition of
YAMLCtor_include
. Is this done on purpose?