Skip to contentSkip to conversation

rteval: fixed comments

PATCH In review Anubhav Shelat 2 participants 2 messages Jun 28, 2023

lore
Share & tools
lore
#0 lore raw

PATCH v2 2/3 rteval: fixed comments

rteval-cmd: fixed typo
__init__.py, rtevalConfig: changed comments to use argparse instead of optparse

---
 rteval-cmd                 | 2 +-
 rteval/modules/__init__.py | 4 ++--
 rteval/rtevalConfig.py     | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
rteval-cmd +1 -1
index ae94bd98cc11..1f2ea08ef4ff 100755
@@ -183,7 +183,7 @@ def parse_options(cfg, parser, cmdargs):
             ind = cmdargs.index('--summarize')
         cmd_args = cmdargs[ind+1:]
         cmdargs = cmdargs[:ind+1]
-    # if -H/--raw-histogram is specified, add the files to be summarized to cmd_args, and add -Z to cmd_opts
+    # if -H/--raw-histogram is specified, add the files to be summarized to cmd_args, and add -H to cmd_opts
     elif (sys.argv.count('-H')+sys.argv.count('--raw-histogram')) > 0:
         try:
             ind = cmdargs.index('-H')
rteval/modules/__init__.py +2 -2
index 253e72abf8aa..794135d277b5 100644
@@ -292,7 +292,7 @@ the information provided by the module"""
 
 
     def SetupModuleOptions(self, parser, config):
-        """Sets up a separate optptarse OptionGroup per module with its supported parameters"""
+        """Sets up a separate argparse ArgumentGroup per module with its supported parameters"""
 
         grparser = parser.add_argument_group("Group Options for %s modules" % self.__modtype)
         grparser.add_argument('--%s-cpulist' % self.__modtype,
@@ -451,7 +451,7 @@ class RtEvalModules:
         return self.__modules.GetModulesList()
 
     def SetupModuleOptions(self, parser):
-        "Sets up optparse based option groups for the loaded modules"
+        "Sets up argparse based argument groups for the loaded modules"
         return self.__modules.SetupModuleOptions(parser, self._cfg)
 
     def GetNamedModuleObject(self, modname):
rteval/rtevalConfig.py +1 -1
index ec14a13adcd9..d0115a052324 100644
@@ -291,7 +291,7 @@ class rtevalConfig:
 
         last_sect = None
         for sk, v in sorted(vars(cmd_opts).items()):
-            # optparse key template: {sectionname}___{key}
+            # argparse key template: {sectionname}___{key}
             k = sk.split('___')
             if k[0] != last_sect:
                 # If the section name changed, retrieve the section variables
Signature · 1 line
2.39.3
#1 lore raw
Quoted 63 lines · Anubhav Shelat

rteval-cmd: fixed typo
__init__.py, rtevalConfig: changed comments to use argparse instead of optparse

---
 rteval-cmd                 | 2 +-
 rteval/modules/__init__.py | 4 ++--
 rteval/rtevalConfig.py     | 2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
rteval-cmd +1 -1
index ae94bd98cc11..1f2ea08ef4ff 100755
@@ -183,7 +183,7 @@ def parse_options(cfg, parser, cmdargs):
             ind = cmdargs.index('--summarize')
         cmd_args = cmdargs[ind+1:]
         cmdargs = cmdargs[:ind+1]
-    # if -H/--raw-histogram is specified, add the files to be summarized to cmd_args, and add -Z to cmd_opts
+    # if -H/--raw-histogram is specified, add the files to be summarized to cmd_args, and add -H to cmd_opts
     elif (sys.argv.count('-H')+sys.argv.count('--raw-histogram')) > 0:
         try:
             ind = cmdargs.index('-H')
rteval/modules/__init__.py +2 -2
index 253e72abf8aa..794135d277b5 100644
@@ -292,7 +292,7 @@ the information provided by the module"""
 
 
     def SetupModuleOptions(self, parser, config):
-        """Sets up a separate optptarse OptionGroup per module with its supported parameters"""
+        """Sets up a separate argparse ArgumentGroup per module with its supported parameters"""
 
         grparser = parser.add_argument_group("Group Options for %s modules" % self.__modtype)
         grparser.add_argument('--%s-cpulist' % self.__modtype,
@@ -451,7 +451,7 @@ class RtEvalModules:
         return self.__modules.GetModulesList()
 
     def SetupModuleOptions(self, parser):
-        "Sets up optparse based option groups for the loaded modules"
+        "Sets up argparse based argument groups for the loaded modules"
         return self.__modules.SetupModuleOptions(parser, self._cfg)
 
     def GetNamedModuleObject(self, modname):
rteval/rtevalConfig.py +1 -1
index ec14a13adcd9..d0115a052324 100644
@@ -291,7 +291,7 @@ class rtevalConfig:
 
         last_sect = None
         for sk, v in sorted(vars(cmd_opts).items()):
-            # optparse key template: {sectionname}___{key}
+            # argparse key template: {sectionname}___{key}
             k = sk.split('___')
             if k[0] != last_sect:
                 # If the section name changed, retrieve the section variables
Signature · 1 line
2.39.3