Skip to content

Commit

Permalink
Merge pull request #1388 from girder/fix-b026
Browse files Browse the repository at this point in the history
Fix a bugbear B026 linting error.
  • Loading branch information
manthey authored Nov 28, 2023
2 parents 8600b72 + 41e5523 commit a8882a8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion girder_annotation/girder_large_image_annotation/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ def metadataSearchHandler(*args, **kwargs):
import girder_large_image

return girder_large_image.metadataSearchHandler(
*args,
models=['item'],
searchModels={('annotation', 'large_image'): {'model': 'item', 'reference': 'itemId'}},
metakey='annotation.attributes', *args, **kwargs)
metakey='annotation.attributes', **kwargs)


# Validators
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ def getVersion(self, annotationId, version, user=None, force=False, *args, **kwa
}, fields=['_id'])
if not entry:
return None
result = self.load(entry['_id'], user=user, force=force, *args, **kwargs)
result = self.load(entry['_id'], *args, user=user, force=force, **kwargs)
result['_versionId'] = result['_id']
result['_id'] = result.pop('annotationId', result['_id'])
return result
Expand Down
4 changes: 2 additions & 2 deletions large_image/tilesource/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1041,7 +1041,7 @@ def histogram(self, dtype=None, onlyMinMax=False, bins=256, # noqa
kwargs = kwargs.copy()
histRange = kwargs.pop('range', None)
results = None
for tile in self.tileIterator(format=TILE_FORMAT_NUMPY, *args, **kwargs):
for tile in self.tileIterator(format=TILE_FORMAT_NUMPY, **kwargs):
if time.time() - lastlog > 10:
self.logger.info(
'Calculating histogram min/max %d/%d',
Expand Down Expand Up @@ -1105,7 +1105,7 @@ def histogram(self, dtype=None, onlyMinMax=False, bins=256, # noqa
rbins = int(math.ceil((record['range'][1] - record['range'][0]) / step))
record['range'] = (record['range'][0], record['range'][0] + step * rbins)
record['bins'] = rbins
for tile in self.tileIterator(format=TILE_FORMAT_NUMPY, *args, **kwargs):
for tile in self.tileIterator(format=TILE_FORMAT_NUMPY, **kwargs):
if time.time() - lastlog > 10:
self.logger.info(
'Calculating histogram %d/%d',
Expand Down
2 changes: 1 addition & 1 deletion utilities/tasks/large_image_tasks/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def create_tiff(self, inputFile, outputName=None, outputDir=None, quality=90,
class JobLogger(logging.Handler):
def __init__(self, level=logging.NOTSET, job=None, *args, **kwargs):
self._job = job
super().__init__(level=level, *args, **kwargs)
super().__init__(level=level, **kwargs)

def emit(self, record):
from girder_jobs.models.job import Job
Expand Down

0 comments on commit a8882a8

Please sign in to comment.