Skip to content

Commit

Permalink
Merge pull request #1348 from girder/yesqa
Browse files Browse the repository at this point in the history
Remove unnecessary noqa comments.
  • Loading branch information
manthey authored Oct 25, 2023
2 parents 6560a32 + db1a1ee commit 636129a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,3 +88,7 @@ repos:
hooks:
- id: isort
name: isort (python)
- repo: https://github.com/asottile/yesqa
rev: v1.5.0
hooks:
- id: yesqa
4 changes: 2 additions & 2 deletions girder/girder_large_image/rest/large_image_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ def cursorNextOrNone(cursor):
:returns: the next value or None.
"""
try:
return cursor.next() # noqa - B305
return cursor.next()
except StopIteration:
return None

Expand Down Expand Up @@ -577,7 +577,7 @@ def configValidate(self, config):
config = config.read().decode('utf8')
return self._configValidate(config)

@autoDescribeRoute( # noqa
@autoDescribeRoute(
Description('Reformat a Girder config file')
.param('config', 'The contents of config file to format.',
paramType='body'),
Expand Down
2 changes: 1 addition & 1 deletion large_image/cache_util/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class LruCacheMetaclass(type):
namedCaches = {}
classCaches = {}

def __new__(metacls, name, bases, namespace, **kwargs): # noqa - N804
def __new__(metacls, name, bases, namespace, **kwargs):
# Get metaclass parameters by finding and removing them from the class
# namespace (necessary for Python 2), or preferentially as metaclass
# arguments (only in Python 3).
Expand Down
2 changes: 1 addition & 1 deletion large_image/tilesource/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def getTileSourceFromDict(availableSources, pathOrUri, *args, **kwargs):
sourceName = getSourceNameFromDict(availableSources, pathOrUri, *args, **kwargs)
if sourceName:
return availableSources[sourceName](pathOrUri, *args, **kwargs)
if not os.path.exists(pathOrUri) and '://' not in pathOrUri:
if not os.path.exists(pathOrUri) and '://' not in str(pathOrUri):
raise TileSourceFileNotFoundError(pathOrUri)
raise TileSourceError('No available tilesource for %s' % pathOrUri)

Expand Down
2 changes: 1 addition & 1 deletion large_image/tilesource/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -995,7 +995,7 @@ def _pilFormatMatches(self, image, match=True, **kwargs):
# compatibility could be an issue.
return False

@methodcache() # noqa
@methodcache()
def histogram(self, dtype=None, onlyMinMax=False, bins=256, # noqa
density=False, format=None, *args, **kwargs):
"""
Expand Down

0 comments on commit 636129a

Please sign in to comment.