Skip to content

Commit

Permalink
Updates to run and pass flake8-builtins
Browse files Browse the repository at this point in the history
There are flake8-builtins violations which appear as part of rosdep's
public API. We'll supporess those to avoid breaking API, but still add
the linter plugin so we don't regress more.
  • Loading branch information
cottsay committed Jun 20, 2024
1 parent 66c7832 commit 24782c4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
'extras_require': {
'test': [
'flake8 < 6',
'flake8-builtins',
'flake8-comprehensions',
'pytest',
],
Expand Down
4 changes: 2 additions & 2 deletions src/rosdep2/meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
except NameError:
# Python 2 compatibility
# https://stackoverflow.com/questions/21367320/
FileNotFoundError = IOError
FileNotFoundError = IOError # noqa: A001

import rospkg

Expand Down Expand Up @@ -95,7 +95,7 @@ def __init__(self, cache_dir=None):
self._cache_dir = cache_dir
self._loaded = {}

def set(self, category, metadata):
def set(self, category, metadata): # noqa: A003
"""Add or overwrite metadata in the cache."""
wrapper = CacheWrapper(category, metadata)
# print(category, metadata)
Expand Down
4 changes: 2 additions & 2 deletions src/rosdep2/sources_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,8 @@ def __str__(self):
def __repr__(self):
return repr((self.type, self.url, self.tags, self.rosdep_data, self.origin))

@property
def type(self):
@property # noqa: A003
def type(self): # noqa: A003
"""
:returns: data source type
"""
Expand Down

0 comments on commit 24782c4

Please sign in to comment.