File tree 6 files changed +20
-16
lines changed
6 files changed +20
-16
lines changed Original file line number Diff line number Diff line change @@ -62,11 +62,10 @@ jobs:
62
62
strategy :
63
63
matrix :
64
64
python-version :
65
- - 3.7
66
65
- 3.8
67
66
- 3.9
68
67
- ' 3.10'
69
- - pypy3
68
+ - ' 3.11 '
70
69
steps :
71
70
- uses : actions/checkout@v2
72
71
- uses : actions/setup-python@v2
Original file line number Diff line number Diff line change @@ -6,16 +6,30 @@ exclude: |
6
6
bin/.*
7
7
)$
8
8
repos :
9
+ - repo : https://github.com/pre-commit/pre-commit-hooks
10
+ rev : v4.4.0
11
+ hooks :
12
+ - id : debug-statements
13
+ - id : check-merge-conflict
9
14
- repo : https://github.com/psf/black
10
- rev : 22 .3.0
15
+ rev : 23 .3.0
11
16
hooks :
12
17
- id : black
13
18
language_version : python3
14
- - repo : https://gitlab .com/pycqa/flake8
15
- rev : 3.8.4
19
+ - repo : https://github .com/pycqa/flake8
20
+ rev : 6.0.0
16
21
hooks :
17
22
- id : flake8
18
23
- repo : https://github.com/pycqa/isort
19
- rev : 5.7 .0
24
+ rev : 5.12 .0
20
25
hooks :
21
26
- id : isort
27
+ - repo : https://github.com/humitos/mirrors-autoflake.git
28
+ rev : v1.1
29
+ hooks :
30
+ - id : autoflake
31
+ exclude : |
32
+ (?x)^(
33
+ .*/?__init__\.py|
34
+ )$
35
+ args : ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable']
Original file line number Diff line number Diff line change @@ -100,15 +100,13 @@ def __new__(cls, *parts):
100
100
101
101
@classmethod
102
102
def cons_merge (cls , car_part , cdr_part ):
103
-
104
103
if cdr_part is None :
105
104
cdr_part = default_ConsNull ()
106
105
107
106
if isinstance (cdr_part , Mapping ):
108
107
cdr_part = cdr_part .items ()
109
108
110
109
if isinstance (cdr_part , ItemsView ):
111
-
112
110
return OrderedDict (chain ((car_part ,), cdr_part ))
113
111
114
112
elif hasattr (cdr_part , "__add__" ) or hasattr (cdr_part , "__radd__" ):
@@ -142,7 +140,6 @@ def __str__(self):
142
140
143
141
class MaybeConsType (ABCMeta ):
144
142
def __subclasscheck__ (self , o ):
145
-
146
143
if issubclass (o , tuple (_cdr .funcs .keys ())) and not issubclass (o , NonCons ):
147
144
return True
148
145
Original file line number Diff line number Diff line change 7
7
8
8
9
9
def _unify_Cons (lcons , rcons , s ):
10
-
11
10
lcons_ = lcons
12
11
rcons_ = rcons
13
12
Original file line number Diff line number Diff line change 30
30
"Operating System :: OS Independent" ,
31
31
"Programming Language :: Python" ,
32
32
"Programming Language :: Python :: 3" ,
33
- "Programming Language :: Python :: 3.7" ,
34
33
"Programming Language :: Python :: 3.8" ,
35
34
"Programming Language :: Python :: 3.9" ,
36
35
"Programming Language :: Python :: 3.10" ,
36
+ "Programming Language :: Python :: 3.11" ,
37
37
"Programming Language :: Python :: Implementation :: CPython" ,
38
38
"Programming Language :: Python :: Implementation :: PyPy" ,
39
39
"Topic :: Software Development :: Libraries" ,
Original file line number Diff line number Diff line change 10
10
11
11
12
12
def test_noncons_type ():
13
-
14
13
with pytest .raises (TypeError ):
15
14
NonCons ()
16
15
@@ -50,7 +49,6 @@ def test_cons_type():
50
49
51
50
52
51
def test_cons_null ():
53
-
54
52
with pytest .raises (TypeError ):
55
53
ConsNull ()
56
54
@@ -68,7 +66,6 @@ def test_cons_null():
68
66
69
67
70
68
def test_proper_sequence_type ():
71
-
72
69
with pytest .raises (TypeError ):
73
70
ProperSequence ()
74
71
@@ -87,7 +84,6 @@ def test_proper_sequence_type():
87
84
88
85
89
86
def test_cons_join ():
90
-
91
87
with pytest .raises (ValueError ):
92
88
cons ("a" )
93
89
@@ -138,7 +134,6 @@ def test_cons_class():
138
134
139
135
140
136
def test_car_cdr ():
141
-
142
137
with pytest .raises (ConsError ):
143
138
car (object ())
144
139
You can’t perform that action at this time.
0 commit comments