Skip to content

Commit

Permalink
chore: fix ruff command (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
legendecas committed Jul 1, 2024
1 parent 706d04a commit 0b8f5bf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
pip install --editable ".[dev]"
- run: ./gyp -V && ./gyp --version && gyp -V && gyp --version
- name: Lint with ruff # See pyproject.toml for settings
run: ruff --output-format=github .
run: ruff check --output-format=github .
- name: Test with pytest # See pyproject.toml for settings
run: pytest
# - name: Run doctests with pytest
Expand Down
6 changes: 3 additions & 3 deletions pylib/gyp/xcodeproj_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ def UpdateProperties(self, properties, do_copy=False):
# Make sure the property conforms to the schema.
(is_list, property_type, is_strong) = self._schema[property][0:3]
if is_list:
if value.__class__ != list:
if not isinstance(value.__class__, list):
raise TypeError(
property
+ " of "
Expand All @@ -791,7 +791,7 @@ def UpdateProperties(self, properties, do_copy=False):
)
for item in value:
if not isinstance(item, property_type) and not (
isinstance(item, str) and property_type == str
isinstance(item, str) and isinstance(property_type, str)
):
# Accept unicode where str is specified. str is treated as
# UTF-8-encoded.
Expand All @@ -806,7 +806,7 @@ def UpdateProperties(self, properties, do_copy=False):
+ item.__class__.__name__
)
elif not isinstance(value, property_type) and not (
isinstance(value, str) and property_type == str
isinstance(value, str) and isinstance(property_type, str)
):
# Accept unicode where str is specified. str is treated as
# UTF-8-encoded.
Expand Down

0 comments on commit 0b8f5bf

Please sign in to comment.