From 16c7d49df6ab66b0a71105fecca932a38c15052e Mon Sep 17 00:00:00 2001 From: Ben Donnelly Date: Wed, 1 Nov 2023 18:02:55 +0000 Subject: [PATCH] fix(dev): fix build version to 3.12 fix lint issue in new version --- .github/workflows/on_push.yaml | 2 +- .github/workflows/on_release.yml | 2 +- .github/workflows/pages.yml | 2 +- src/deep/api/tracepoint/eventsnapshot.py | 2 +- test/test_deep/processor/test_variable_processor.py | 4 +++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/on_push.yaml b/.github/workflows/on_push.yaml index cce14e0..c36dda2 100644 --- a/.github/workflows/on_push.yaml +++ b/.github/workflows/on_push.yaml @@ -15,7 +15,7 @@ jobs: - name: Setup Python # Set Python version uses: actions/setup-python@v4 with: - python-version: '3.x' + python-version: '3.12' # Install pip and pytest - name: Install dependencies run: | diff --git a/.github/workflows/on_release.yml b/.github/workflows/on_release.yml index 84b3637..7ea5a8e 100644 --- a/.github/workflows/on_release.yml +++ b/.github/workflows/on_release.yml @@ -19,7 +19,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v3 with: - python-version: '3.x' + python-version: '3.12' - name: Install deps run: | diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 042b609..639476f 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v3 - uses: actions/setup-python@v4 with: - python-version: 3.x + python-version: 3.12 - run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV - uses: actions/cache@v3 with: diff --git a/src/deep/api/tracepoint/eventsnapshot.py b/src/deep/api/tracepoint/eventsnapshot.py index 719024c..587c23c 100644 --- a/src/deep/api/tracepoint/eventsnapshot.py +++ b/src/deep/api/tracepoint/eventsnapshot.py @@ -257,7 +257,7 @@ def __repr__(self) -> str: return self.__str__() def __eq__(self, o) -> bool: - if type(o) != VariableId: + if not isinstance(o, VariableId): return False if id(o) == id(self): diff --git a/test/test_deep/processor/test_variable_processor.py b/test/test_deep/processor/test_variable_processor.py index a45c5f9..1b9fd7e 100644 --- a/test/test_deep/processor/test_variable_processor.py +++ b/test/test_deep/processor/test_variable_processor.py @@ -27,7 +27,7 @@ class MockVariable(Variable): def __eq__(self, o: object) -> bool: - if type(o) != Variable: + if not isinstance(o, Variable): return False if id(o) == id(self): @@ -40,12 +40,14 @@ def __eq__(self, o: object) -> bool: class MockNode(Node): def __eq__(self, o: object) -> bool: + # noinspection PyUnresolvedReferences return o.value == self.value class MockNodeValue(NodeValue): def __eq__(self, o: object) -> bool: + # noinspection PyUnresolvedReferences return o.name == self.name and o.value == self.value