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

Removed Python 3.7 & 3.8 from tests, fixed PEP8 errors #214

Merged
merged 5 commits into from
Mar 19, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
tests:
strategy:
matrix:
python: ['3.7', '3.8', '3.9', '3.10']
python: ['3.9', '3.10']
runs-on: ubuntu-latest
env:
CI: 1
Expand Down
4 changes: 2 additions & 2 deletions urdf2webots/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,9 @@ def convertUrdfContent(input, output=None, robotName=None, normal=False, boxColl
else:
urdfDirectory = os.getcwd()

if not type(initTranslation) == str or len(initTranslation.split()) != 3:
if not isinstance(initTranslation, str) or len(initTranslation.split()) != 3:
sys.exit('--translation argument is not valid. It has to be of Type = str and contain 3 values.')
if not type(initRotation) == str or len(initRotation.split()) != 4:
if not isinstance(initRotation, str) or len(initRotation.split()) != 4:
sys.exit('--rotation argument is not valid. It has to be of Type = str and contain 4 values.')
if initPos is not None:
try:
Expand Down
2 changes: 1 addition & 1 deletion urdf2webots/writeRobot.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(self):

def __eq__(self, other):
"""To compare a RGB color with a float list."""
if type(other) == list:
if isinstance(other, list):
return ((self.red, self.green, self.blue) == (other[0], other[1], other[2]))
return ((self.red, self.green, self.blue) == (other.red, other.green, other.blue))

Expand Down
Loading