diff --git a/.github/workflows/python_tests.yml b/.github/workflows/python_tests.yml index f66f3bd..1140ef2 100644 --- a/.github/workflows/python_tests.yml +++ b/.github/workflows/python_tests.yml @@ -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 diff --git a/pylib/gyp/xcodeproj_file.py b/pylib/gyp/xcodeproj_file.py index 33c667c..4f92cd0 100644 --- a/pylib/gyp/xcodeproj_file.py +++ b/pylib/gyp/xcodeproj_file.py @@ -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 " @@ -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. @@ -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.