Import 2017-06-07 23:51:09: master eb2b4b3b

Author Committer Branch Timestamp Parent
jcfr jcfr master 2015-11-19 22:55:52 master f8450373
Changeset

STYLE: Update python scripts to use "is None" instead of "== None"

Rational copied from https://www.python.org/dev/peps/pep-0290/#testing-for-none

// -----------------
Since there is only one None object, equality can be tested with identity. Identity tests are slightly faster than equality tests. Also, some object types may overload comparison, so equality testing may be much slower.

Pattern:

if v == None --> if v is None:
if v != None --> if v is not None:
// -----------------

Reviewed-by: Csaba Pinter <csaba.pinter@queensu.ca>
Reviewed-by: Max Smolens <max.smolens@kitware.com>

git-svn-id: http://svn.slicer.org/Slicer4/trunk@24758 3bd1e089-480b-0410-8dfb-8563597acbee

mod - Applications/SlicerApp/Testing/Python/AtlasTests.py Diff File
mod - Applications/SlicerApp/Testing/Python/Charting.py Diff File
mod - Applications/SlicerApp/Testing/Python/DTINotReproducibleIssue3977.py Diff File
mod - Applications/SlicerApp/Testing/Python/FiducialLayoutSwitchBug1914.py Diff File
mod - Applications/SlicerApp/Testing/Python/JRC2013Vis.py Diff File
mod - Applications/SlicerApp/Testing/Python/RSNA2012ProstateDemo.py Diff File
mod - Applications/SlicerApp/Testing/Python/RSNAQuantTutorial.py Diff File
mod - Applications/SlicerApp/Testing/Python/RSNAVisTutorial.py Diff File
mod - Applications/SlicerApp/Testing/Python/ScenePerformance.py Diff File
mod - Applications/SlicerApp/Testing/Python/ScriptedModuleDiscoveryTest.py Diff File
mod - Applications/SlicerApp/Testing/Python/SliceLinkLogic.py Diff File
mod - Applications/SlicerApp/Testing/Python/Slicer4Minute.py Diff File
mod - Applications/SlicerApp/Testing/Python/SlicerMRBSaveRestoreCheckPathsTest.py Diff File
mod - Applications/SlicerApp/Testing/Python/SubjectHierarchyCorePluginsSelfTest.py Diff File
mod - Applications/SlicerApp/Testing/Python/SubjectHierarchyGenericSelfTest.py Diff File
mod - Applications/SlicerApp/Testing/Python/ViewControllersSliceInterpolationBug1926.py Diff File
mod - Applications/SlicerApp/Testing/Python/fiber_visibility_crash2438.py Diff File
mod - Applications/SlicerApp/Testing/Python/sceneImport2428.py Diff File
mod - Applications/SlicerApp/Testing/Python/slicerCloseCrashBug2590.py Diff File
mod - Applications/SlicerApp/Testing/Python/test_tractography_display.py Diff File
mod - Base/Python/slicer/release/midasdata.py Diff File
mod - Base/Python/tpycl/tpycl.py Diff File
mod - Extensions/Testing/ScriptedLoadableExtensionTemplate/ScriptedLoadableModuleTemplate/ScriptedLoadableModuleTemplate.py Diff File
mod - Modules/Loadable/Colors/Testing/Python/CustomColorTableSceneViewRestoreTestBug3992.py Diff File
mod - Modules/Loadable/CropVolume/Testing/Python/CropVolumeSelfTest.py Diff File
mod - Modules/Loadable/Markups/Testing/Python/MarkupsInCompareViewersSelfTest.py Diff File
mod - Modules/Loadable/Markups/Testing/Python/MarkupsInViewsSelfTest.py Diff File
mod - Modules/Loadable/Markups/Testing/Python/NeurosurgicalPlanningTutorialMarkupsSelfTest.py Diff File
mod - Modules/Loadable/SceneViews/Testing/Python/AddStorableDataAfterSceneViewTest.py Diff File
mod - Modules/Scripted/DICOMLib/DICOMExportScalarVolume.py Diff File
mod - Modules/Scripted/DICOMLib/DICOMExportScene.py Diff File
mod - Modules/Scripted/DICOMLib/DICOMPlugin.py Diff File
mod - Modules/Scripted/DICOMLib/DICOMProcesses.py Diff File
mod - Modules/Scripted/DICOMLib/DICOMWidgets.py Diff File
mod - Modules/Scripted/DICOMPlugins/DICOMScalarVolumePlugin.py Diff File
mod - Modules/Scripted/DataProbe/DataProbe.py Diff File
mod - Modules/Scripted/DataProbe/DataProbeLib/SliceViewAnnotations.py Diff File
mod - Modules/Scripted/Editor/Editor.py Diff File
mod - Modules/Scripted/EditorLib/EditUtil.py Diff File
mod - Modules/Scripted/EditorLib/HelperBox.py Diff File
mod - Modules/Scripted/EditorLib/RectangleEffect.py Diff File
mod - Modules/Scripted/Endoscopy/Endoscopy.py Diff File
mod - Modules/Scripted/FiberBundleToLabelMap/FiberBundleToLabelMap.py Diff File
mod - Modules/Scripted/LabelStatistics/LabelStatistics.py Diff File
mod - Modules/Scripted/SampleData/SampleData.py Diff File
mod - Modules/Scripted/SurfaceToolbox/SurfaceToolbox.py Diff File
mod - Utilities/Scripts/SEMToMediaWiki.py Diff File
mod - Utilities/Templates/Modules/Scripted/TemplateKey.py Diff File