[PIPE2D-42] remove "super" from python classes Created: 22/Jul/16  Updated: 20/Oct/18  Resolved: 20/Oct/18

Status: Won't Fix
Project: DRP 2-D Pipeline
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Story Priority: Major
Reporter: aritter Assignee: price
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Story Points: 0.25

 Description   

According to the coding standards 'super' should not be used in Python classes



 Comments   
Comment by rhl [ 03/Sep/16 ]

There are 10 occurrences:

python/pfs/drp/stella/addDummyHeaderKeywordsTask.py:        super(AddDummyHeaderKeywordsTask, self).__init__(*args, **kwargs)
python/pfs/drp/stella/createFlatFiberTraceProfileTask.py:        super(CreateFlatFiberTraceProfileTask, self).__init__(*args, **kwargs)
python/pfs/drp/stella/extractFromProfileTask.py:        super(ExtractFromProfileTask, self).__init__(*args, **kwargs)
python/pfs/drp/stella/extractSpectraTask.py:        super(ExtractSpectraTask, self).__init__(*args, **kwargs)
python/pfs/drp/stella/findAndTraceAperturesTask.py:        super(FindAndTraceAperturesTask, self).__init__(*args, **kwargs)
python/pfs/drp/stella/getTwoDPsfPerBinTask.py:        super(GetTwoDPsfPerBinTask, self).__init__(*args, **kwargs)
python/pfs/drp/stella/readFileTask.py:        super(ReadFileTask, self).__init__(*args, **kwargs)
python/pfs/drp/stella/reduceArcRefSpecTask.py:        super(ReduceArcRefSpecTask, self).__init__(*args, **kwargs)
python/pfs/drp/stella/reduceArcTask.py:        super(ReduceArcTask, self).__init__(*args, **kwargs)
python/pfs/drp/stella/traceCmdLineTask.py:        super(TraceArgumentParser, self).__init__(*args, **kwargs)
Comment by price [ 19/Oct/18 ]

Is this still desirable? LSST is starting to use super again now we have switched to python 3.

Comment by hassan [ 20/Oct/18 ]

Looking at https://developer.lsst.io/python/style.html#super-may-be-used-to-call-parent-class-methods (thanks to Yusra Alsayyad [LSST]) indeed we can keep super. I believe PFS should align as closely as possible to the coding standards provided by LSST.

But we should still review our code such that the use of super is aligned with the LSST guidelines. But this specific issue can be closed with no action.

Comment by hassan [ 20/Oct/18 ]

{{super} no longer needs to be removed with Python 3.

Generated at Sat Feb 10 15:47:39 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.