Skip to content

Commit

Permalink
Removed Python 3.7 & 3.8 from tests, fixed PEP8 errors (#214)
Browse files Browse the repository at this point in the history
* Update test.yml

* Update test.yml

* Update writeRobot.py

* Update importer.py

* Update importer.py
  • Loading branch information
omichel authored Mar 19, 2024
1 parent 905b12c commit 160b252
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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

0 comments on commit 160b252

Please sign in to comment.