Skip to content

Commit

Permalink
remove Self type
Browse files Browse the repository at this point in the history
  • Loading branch information
weiwei committed Feb 21, 2024
1 parent 7bbc7ad commit 628eaa7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.6", "3.9", "3.10", "3.11", "3.x"]
python-version: ["3.6", "3.x"]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
Expand Down
10 changes: 5 additions & 5 deletions junitparser/junitparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import itertools
from copy import deepcopy
from typing import List, Self
from typing import List

try:
from lxml import etree
Expand Down Expand Up @@ -505,7 +505,7 @@ def __iter__(self):
def __len__(self):
return len(list(self.__iter__()))

def __eq__(self, other: Self):
def __eq__(self, other):
def props_eq(props1, props2):
props1 = list(props1)
props2 = list(props2)
Expand All @@ -522,7 +522,7 @@ def props_eq(props1, props2):
and self.timestamp == other.timestamp
) and props_eq(self.properties(), other.properties())

def __add__(self, other: Self):
def __add__(self, other):
if self == other:
# Merge the two testsuites
result = deepcopy(self)
Expand All @@ -538,7 +538,7 @@ def __add__(self, other: Self):
result.add_testsuite(other)
return result

def __iadd__(self, other: Self):
def __iadd__(self, other):
if self == other:
for case in other:
self._add_testcase_no_update_stats(case)
Expand Down Expand Up @@ -611,7 +611,7 @@ def _add_testcase_no_update_stats(self, testcase: TestCase):
"""
self.append(testcase)

def add_testsuite(self, suite: Self):
def add_testsuite(self, suite):
"""Add a testsuite *suite* to the testsuite."""
self.append(suite)

Expand Down

0 comments on commit 628eaa7

Please sign in to comment.