mirror of
https://github.com/littlefs-project/littlefs.git
synced 2025-12-07 08:02:46 +00:00
scripts: Renamed RInt (and friends) -> CsvInt (and friends)
This prefix was extremely arbitrary anyways. The prefix Csv* has slightly more meaning than R*, since these scripts interact with .csv files quite a bit, and it avoids confusion with rbyd-related things such as Rattr, Ralt, etc.
This commit is contained in:
@@ -34,10 +34,10 @@ SECTIONS = ['.text', '.rodata', '.data']
|
||||
|
||||
|
||||
# integer fields
|
||||
class RInt(co.namedtuple('RInt', 'x')):
|
||||
class CsvInt(co.namedtuple('CsvInt', 'x')):
|
||||
__slots__ = ()
|
||||
def __new__(cls, x=0):
|
||||
if isinstance(x, RInt):
|
||||
if isinstance(x, CsvInt):
|
||||
return x
|
||||
if isinstance(x, str):
|
||||
try:
|
||||
@@ -143,12 +143,12 @@ class CodeResult(co.namedtuple('CodeResult', [
|
||||
_by = ['file', 'function']
|
||||
_fields = ['size']
|
||||
_sort = ['size']
|
||||
_types = {'size': RInt}
|
||||
_types = {'size': CsvInt}
|
||||
|
||||
__slots__ = ()
|
||||
def __new__(cls, file='', function='', size=0):
|
||||
return super().__new__(cls, file, function,
|
||||
RInt(size))
|
||||
CsvInt(size))
|
||||
|
||||
def __add__(self, other):
|
||||
return CodeResult(self.file, self.function,
|
||||
|
||||
Reference in New Issue
Block a user