Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary noqa comments. #1348

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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