function
stringlengths
11
56k
repo_name
stringlengths
5
60
features
list
def __init__(self, name, class_or_struct, clean_lines, linenum): _BlockInfo.__init__(self, False) self.name = name self.starting_linenum = linenum self.is_derived = False self.check_namespace_indentation = True if class_or_struct == 'struct': self.access = 'public' self.is_struct = T...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckEnd(self, filename, clean_lines, linenum, error): # If there is a DISALLOW macro, it should appear near the end of # the class. seen_last_thing_in_class = False for i in xrange(linenum - 1, self.starting_linenum, -1): match = Search( r'\b(DISALLOW_COPY_AND_ASSIGN|DISALLOW_IMPLIC...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def __init__(self, name, linenum): _BlockInfo.__init__(self, False) self.name = name or '' self.starting_linenum = linenum self.check_namespace_indentation = True
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def __init__(self, stack_before_if): # The entire nesting stack before #if self.stack_before_if = stack_before_if # The entire nesting stack up to #else self.stack_before_else = [] # Whether we have already seen #else or #elif self.seen_else = False
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def __init__(self): # Stack for tracking all braces. An object is pushed whenever we # see a "{", and popped when we see a "}". Only 3 types of # objects are possible: # - _ClassInfo: a class or struct. # - _NamespaceInfo: a namespace. # - _BlockInfo: some other type of block. self.stack =...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def InNamespaceBody(self): """Check if we are currently one level inside a namespace body. Returns: True if top of the stack is a namespace block, False otherwise. """ return self.stack and isinstance(self.stack[-1], _NamespaceInfo)
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def InClassDeclaration(self): """Check if we are currently one level inside a class or struct declaration. Returns: True if top of the stack is a class/struct, False otherwise. """ return self.stack and isinstance(self.stack[-1], _ClassInfo)
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def InTemplateArgumentList(self, clean_lines, linenum, pos): """Check if current position is inside template argument list. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. pos: position just after the suspected template argument. ...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def Update(self, filename, clean_lines, linenum, error): """Update nesting state with current line. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any err...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckCompletedBlocks(self, filename, error): """Checks that all classes and namespaces have been completely parsed. Call this when all lines in a file have been processed. Args: filename: The name of the current file. error: The function to call with any errors found. """ # Note: Th...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckSpacingForFunctionCall(filename, clean_lines, linenum, error): """Checks for the correctness of various spacing around function calls. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: T...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckForNamespaceIndentation(filename, nesting_state, clean_lines, line, error): is_namespace_indent_item = ( len(nesting_state.stack) > 1 and nesting_state.stack[-1].check_namespace_indentation and isinstance(nesting_state.previous_stack_top, _NamespaceInfo) and...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckComment(line, filename, linenum, next_line_start, error): """Checks for common mistakes in comments. Args: line: The line in question. filename: The name of the current file. linenum: The number of the line to check. next_line_start: The first non-whitespace column of the next line. er...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckSpacing(filename, clean_lines, linenum, nesting_state, error): """Checks for the correctness of various spacing issues in the code. Things we check for: spaces around operators, spaces after if/for/while/switch, no spaces around parens in function calls, two spaces between code and comment, don't star...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckParenthesisSpacing(filename, clean_lines, linenum, error): """Checks for horizontal spacing around parentheses. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call wit...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckBracesSpacing(filename, clean_lines, linenum, error): """Checks for horizontal spacing near commas. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def IsTemplateParameterList(clean_lines, linenum, column): """Check if the token ending on (linenum, column) is the end of template<>. Args: clean_lines: A CleansedLines instance containing the file. linenum: the number of the line to check. column: end column of the token to check. Returns: True...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def IsDeletedOrDefault(clean_lines, linenum): """Check if current constructor or operator is deleted or default. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. Returns: True if this is a deleted or default constructor. """ open_paren = c...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def GetTemplateArgs(clean_lines, linenum): """Find list of template arguments associated with this function declaration. Args: clean_lines: A CleansedLines instance containing the file. linenum: Line number containing the start of the function declaration, usually one line after the end of the...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckSectionSpacing(filename, clean_lines, class_info, linenum, error): """Checks for additional blank line issues related to sections. Currently the only thing checked here is blank line before protected/private. Args: filename: The name of the current file. clean_lines: A CleansedLines instance co...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckBraces(filename, clean_lines, linenum, error): """Looks for misplaced braces (e.g. at the end of line). Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any er...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckEmptyBlockBody(filename, clean_lines, linenum, error): """Look for empty loop/conditional body with only a single semicolon. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The functio...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckCheck(filename, clean_lines, linenum, error): """Checks the use of CHECK and EXPECT macros. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. ...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def GetLineWidth(line): """Determines the width of the line in column positions. Args: line: A string, which may be a Unicode string. Returns: The width of the line in column positions, accounting for Unicode combining characters and wide characters. """ if isinstance(line, unicode): width =...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def _DropCommonSuffixes(filename): """Drops common suffixes like _test.cc or -inl.h from filename. For example: >>> _DropCommonSuffixes('foo/foo-inl.h') 'foo/foo' >>> _DropCommonSuffixes('foo/bar/foo.cc') 'foo/bar/foo' >>> _DropCommonSuffixes('foo/foo_internal.h') 'foo/foo' >>> _DropCom...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def _ClassifyInclude(fileinfo, include, is_system): """Figures out what kind of header 'include' is. Args: fileinfo: The current file cpplint is running over. A FileInfo instance. include: The path to a #included file. is_system: True if the #include used <> rather than "". Returns: One of the _...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def _GetTextInside(text, start_pattern): r"""Retrieves all the text between matching open and close parentheses. Given a string of lines and a regular expression string, retrieve all the text following the expression and between opening punctuation symbols like (, [, or {, and the matching close-punctuation sy...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckLanguage(filename, clean_lines, linenum, file_extension, include_state, nesting_state, error): """Checks rules from the 'C++ language rules' section of cppguide.html. Some of these rules are hard to test (function overloading, using uint32 inappropriately), but we do the best we can. ...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckGlobalStatic(filename, clean_lines, linenum, error): """Check for unsafe global or static objects. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors ...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def IsDerivedFunction(clean_lines, linenum): """Check if current line contains an inherited function. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. Returns: True if current line contains a function with "override" virt-specifier. """ ...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def IsInitializerList(clean_lines, linenum): """Check if current line is inside constructor initializer list. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. Returns: True if current line appears to be inside constructor initializer list,...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckCasts(filename, clean_lines, linenum, error): """Various cast related checks. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to call with any errors found. """ line =...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def ExpectingFunctionArgs(clean_lines, linenum): """Checks whether where function type arguments are expected. Args: clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. Returns: True if the line at 'linenum' is inside something that expects arguments ...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def FilesBelongToSameModule(filename_cc, filename_h): """Check if these two filenames belong to the same module. The concept of a 'module' here is a as follows: foo.h, foo-inl.h, foo.cc, foo_test.cc and foo_unittest.cc belong to the same 'module' if they are in the same directory. some/path/public/xyzzy and ...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckForIncludeWhatYouUse(filename, clean_lines, include_state, error, io=codecs): """Reports for missing stl includes. This function will output warnings to make sure you are including the headers necessary for the stl containers and functions that you use. We only give one r...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckMakePairUsesDeduction(filename, clean_lines, linenum, error): """Check that make_pair's template arguments are deduced. G++ 4.6 in C++11 mode fails badly if make_pair's template arguments are specified explicitly, and such use isn't intended in any case. Args: filename: The name of the current fi...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckRedundantVirtual(filename, clean_lines, linenum, error): """Check if line contains a redundant "virtual" function-specifier. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The functio...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def IsBlockInNameSpace(nesting_state, is_forward_declaration): """Checks that the new block is directly in a namespace. Args: nesting_state: The _NestingState object that contains info about our state. is_forward_declaration: If the class is a forward declared class. Returns: Whether or not the new b...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def CheckItemIndentationInNamespace(filename, raw_lines_no_comments, linenum, error): line = raw_lines_no_comments[linenum] if Match(r'^\s+', line): error(filename, linenum, 'runtime/indentation_namespace', 4, 'Do not indent within a namespace')
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def FlagCxx11Features(filename, clean_lines, linenum, error): """Flag those c++11 features that we only allow in certain places. Args: filename: The name of the current file. clean_lines: A CleansedLines instance containing the file. linenum: The number of the line to check. error: The function to ...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def ProcessConfigOverrides(filename): """ Loads the configuration files and processes the config overrides. Args: filename: The name of the file being processed by the linter. Returns: False if the current |filename| should not be processed further. """ abs_filename = os.path.abspath(filename) cf...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def PrintUsage(message): """Prints a brief usage string and exits, optionally with an error message. Args: message: The optional error message. """ sys.stderr.write(_USAGE) if message: sys.exit('\nFATAL ERROR: ' + message) else: sys.exit(1)
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def ParseArguments(args): """Parses the command line arguments. This may set the output format and verbosity level as side-effects. Args: args: The command line arguments: Returns: The list of filenames to lint. """ try: (opts, filenames) = getopt.getopt(args, '', ['help', 'output=', 'verbose...
24OI/CodeStack
[ 15, 6, 15, 4, 1445156661 ]
def exportMultiBuy(fit, options, callback): itemAmounts = {} for module in fit.modules: if module.item: # Mutated items are of no use for multibuy if module.isMutated: continue _addItem(itemAmounts, module.item) if module.charge and options[Po...
DarkFenX/Pyfa
[ 1401, 374, 1401, 265, 1370894453 ]
def run(self, niter): if not isinstance(niter, int): raise ValueError('The provided number of steps have to be an integer not {} with value {}'.format(type(niter), niter)) if not (pmi._PMIComm and pmi._PMIComm.isActive()) or pmi._MPIcomm.rank in pmi._PMIComm.getMPIcpugroup(): ret...
espressopp/espressopp
[ 38, 32, 38, 48, 1412685868 ]
def getExtension(self, k): if not (pmi._PMIComm and pmi._PMIComm.isActive()) or pmi._MPIcomm.rank in pmi._PMIComm.getMPIcpugroup(): return self.cxxclass.getExtension(self, k)
espressopp/espressopp
[ 38, 32, 38, 48, 1412685868 ]
def list_plex_logs(): logs_dir = plexpy.CONFIG.PMS_LOGS_FOLDER if not logs_dir or logs_dir and not os.path.exists(logs_dir): return [] log_files = [] for file in os.listdir(logs_dir): if file.startswith('Plex Transcoder Statistics'): # Plex Transcoder Statistics is an XML f...
JonnyWong16/plexpy
[ 4776, 573, 4776, 69, 1424622966 ]
def __init__(self): """ Sets up members """ # Call the parent constructor _jvmfinder.JVMFinder.__init__(self) # Library file name self._libfile = "jvm.dll" # Search methods self._methods = (self._get_from_java_home, self....
Beyond-Imagination/BlubBlub
[ 2, 3, 2, 1, 1500900633 ]
def setUp(self): self.old_serial = serial.Serial serial.Serial = util.dummy_serial.Serial self.adapter = MockBLED112(3) self.dev1 = SimpleVirtualDevice(100, 'TestCN') self.dev1_ble = MockBLEDevice("00:11:22:33:44:55", self.dev1) self.adapter.add_device(self.dev1_ble) ...
iotile/coretools
[ 13, 7, 13, 230, 1479861690 ]
def test_basic_init(self): """Test that we initialize correctly and the bled112 comes up scanning """ assert self.bled.scanning
iotile/coretools
[ 13, 7, 13, 230, 1479861690 ]
def _on_disconnect_callback(self, *args, **kwargs): pass
iotile/coretools
[ 13, 7, 13, 230, 1479861690 ]
def render(item, join='', **fields): """ Render the given item """ if item is None: return '' elif isinstance(item, str): return item elif isinstance(item, Renderer): return item.render(join=join, **fields) elif isiter(item): return join.join(render(e, **fields) f...
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def render(self, item, join='', **fields): return render(item, join=join, **fields)
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def __init__(self, template=None): if template is not None: self.template = template
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def counter(cls): return next(cls._counter)
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def reset_counter(cls): Renderer._counter = itertools.count()
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def formatter(self): return self._formatter
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def formatter(self, value): self._formatter = value
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def indent(self, item, ind=1, multiplier=4): return indent(self.rend(item), indent=ind)
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def render_fields(self, fields): """ Pre-render fields before rendering the template. """ return
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def __str__(self): return self.render()
EternityForest/KaithemAutomation
[ 33, 5, 33, 2, 1369977456 ]
def __init__(self, db, data): super(Group, self).__init__(db, data) self._group_lock = RLock() self._members = []
M4rtinK/tsubame
[ 2, 1, 2, 47, 1487971767 ]
def clear(self): with self._group_lock: self.data.members.clear() self._members.clear()
M4rtinK/tsubame
[ 2, 1, 2, 47, 1487971767 ]
def members(self): with self._group_lock: return self._members
M4rtinK/tsubame
[ 2, 1, 2, 47, 1487971767 ]
def swap(self, item_1, item_2): # TODO raise NotImplementedError
M4rtinK/tsubame
[ 2, 1, 2, 47, 1487971767 ]
def replace_items(self, new_items): with self._group_lock: self._members.clear() self.data.members.clear() self._members = new_items self.data.members = [i.data for i in new_items]
M4rtinK/tsubame
[ 2, 1, 2, 47, 1487971767 ]
def new(cls, db): data = FilterGroupData(copy.deepcopy(cls.data_defaults)) return cls(db, data)
M4rtinK/tsubame
[ 2, 1, 2, 47, 1487971767 ]
def _load_members(self): for item_data in self.data.members: # Fetch the functional filter class based # based on data class. cls = filter.CLASS_MAP.get(item_data.__class__) if cls is None: self.log.error("Filter class class not found for data: %s"...
M4rtinK/tsubame
[ 2, 1, 2, 47, 1487971767 ]
def clean(self): """Make sure all managers are also members.""" members = list(self.cleaned_data['members']) for manager in self.cleaned_data['managers']: if manager not in members: members.append(manager) self.cleaned_data['members'] = members return ...
lizardsystem/lizard-security
[ 3, 1, 3, 1, 1321352641 ]
def queryset(self, request): """Limit user groups to those you manage. The superuser can edit all user groups, of course. """ qs = super(UserGroupAdmin, self).queryset(request) if request.user.is_superuser: return qs return qs.filter(id__in=request.user.mana...
lizardsystem/lizard-security
[ 3, 1, 3, 1, 1321352641 ]
def _available_permissions(self): """Return all permissions we have through user group membership. This method is used by the ``has_{add|change|delete}_permission()`` methods. They have to determine whether we have rights to add/change/delete *some* instance of the model we're the admin...
lizardsystem/lizard-security
[ 3, 1, 3, 1, 1321352641 ]
def has_change_permission(self, request, obj=None): """Return True if we have permission to change the object. If ``obj`` is None, we just have to check if we have global permissions or if we have the permission through a permission mapper. TODO: specific check for object permissions. ...
lizardsystem/lizard-security
[ 3, 1, 3, 1, 1321352641 ]
def get_value( self, trans, grid, user ): return user.email
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, user ): if user.username: return user.username return 'not set'
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, user ): if user.groups: return len( user.groups ) return 0
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, user ): if user.roles: return len( user.roles ) return 0
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, user ): if user.external: return 'yes' return 'no'
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, user ): if user.galaxy_sessions: return self.format( user.galaxy_sessions[ 0 ].update_time ) return 'never'
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, user ): if user.purged: return "purged" elif user.deleted: return "deleted" return ""
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def filter( self, trans, user, query, column_filter ): if column_filter == 'All': return query return query.filter( and_( model.Tool.table.c.user_id == model.User.table.c.id, model.User.table.c.email == column_filter ) )
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_current_item( self, trans, **kwargs ): return trans.user
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, role ): return str( role.name )
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, role ): if role.description: return str( role.description ) return ''
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, role ): return str( role.type )
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, role ): if role.deleted: return "deleted" return ""
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, role ): if role.groups: return len( role.groups ) return 0
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, role ): if role.repositories: return len( role.repositories ) return 0
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, role ): if role.users: return len( role.users ) return 0
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def apply_query_filter( self, trans, query, **kwd ): return query.filter( model.Role.type != model.Role.types.PRIVATE )
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, group ): return str( group.name )
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, group ): if group.deleted: return "deleted" return ""
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, group ): if group.roles: return len( group.roles ) return 0
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, group ): if group.members: return len( group.members ) return 0
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, repository ): if repository.deleted: return 'yes' return ''
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def build_initial_query( self, trans, **kwd ): return trans.sa_session.query( model.Repository ) \ .join( model.User.table )
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, repository_metadata ): return repository_metadata.id
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, repository_metadata ): return repository_metadata.repository.name
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, repository_metadata ): return repository_metadata.repository.user.username
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, repository_metadata ): repository = repository_metadata.repository return hg_util.get_revision_label( trans.app, repository, repository_metadata.changeset_revision, ...
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]
def get_value( self, trans, grid, repository_metadata ): tools_str = '0' if repository_metadata: metadata = repository_metadata.metadata if metadata: if 'tools' in metadata: # We used to display the following, but grid w...
mikel-egana-aranguren/SADI-Galaxy-Docker
[ 1, 3, 1, 1, 1417087373 ]