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

chore: fix ruff command #263

Merged
merged 1 commit into from
Jul 1, 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/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