Skip to content

Commit cb6605c

Browse files
committed
Increase to v1.0.0
1 parent 47f1b8f commit cb6605c

File tree

6 files changed

+64
-40
lines changed

6 files changed

+64
-40
lines changed

doc/api/more/types_linq.more.more_enumerable.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ Example
104104
[(0, 2), (1, 4), (2, 6)]
105105

106106
Revisions:
107-
- main: New.
107+
- v1.0.0: New.
108108

109109
----
110110

@@ -128,7 +128,7 @@ Example
128128
[(16, 'x'), (16, 't')]
129129

130130
Revisions:
131-
- main: Renamed from ``except_by()`` to this name to accommodate the update to Enumerable class.
131+
- v1.0.0: Renamed from ``except_by()`` to this name to accommodate the update to Enumerable class.
132132
- v0.2.1: Added preliminary support for unhashable keys.
133133

134134
----
@@ -346,7 +346,7 @@ Example
346346
[6, 5, 2, 3, 3, 5, 4, 7, 8, 1, 3] # 101 is largest, so has rank of 1
347347

348348
Revisions:
349-
- main: New.
349+
- v1.0.0: New.
350350

351351
----
352352

@@ -365,7 +365,7 @@ Such comparer takes two values and return positive ints when lhs > rhs, negative
365365
if lhs < rhs, and 0 if they are equal.
366366

367367
Revisions:
368-
- main: New.
368+
- v1.0.0: New.
369369

370370
----
371371

@@ -397,7 +397,7 @@ Example
397397
{3: ['Frank'], 2: ['Alica', 'Rogers'], 1: ['Erika']}
398398
399399
Revisions:
400-
- main: New.
400+
- v1.0.0: New.
401401

402402
----
403403

@@ -417,7 +417,7 @@ Such comparer takes two values and return positive ints when lhs > rhs, negative
417417
if lhs < rhs, and 0 if they are equal.
418418

419419
Revisions:
420-
- main: New.
420+
- v1.0.0: New.
421421

422422
----
423423

doc/api/types_linq.enumerable.rst

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ Example
109109
1000
110110
111111
Revisions:
112-
- main: New.
112+
- v1.0.0: New.
113113

114114
----
115115

@@ -557,7 +557,7 @@ Example
557557
[6561, 19683, 59049, 177147]
558558
559559
Revisions:
560-
- main: New.
560+
- v1.0.0: New.
561561

562562
----
563563

@@ -727,7 +727,7 @@ Example
727727
[1, 4, 6, 3, 99]
728728

729729
Revisions:
730-
- main: New. The method with same name (but different return type) in MoreEnumerable class
730+
- v1.0.0: New. The method with same name (but different return type) in MoreEnumerable class
731731
was removed.
732732

733733
----
@@ -762,7 +762,7 @@ Example
762762
100
763763
764764
Revisions:
765-
- main: Added support for negative index.
765+
- v1.0.0: Added support for negative index.
766766

767767
----
768768

@@ -794,7 +794,7 @@ Example
794794
0
795795
796796
Revisions:
797-
- main: Added support for negative index.
797+
- v1.0.0: Added support for negative index.
798798

799799
----
800800

@@ -858,7 +858,7 @@ Example
858858
[(16, 'x'), (16, 't')]
859859

860860
Revisions:
861-
- main: New. The method with same name (but different usage) in MoreEnumerable class was
861+
- v1.0.0: New. The method with same name (but different usage) in MoreEnumerable class was
862862
renamed as ``except_by2()`` to accommodate this.
863863

864864
----
@@ -1195,7 +1195,7 @@ Example
11951195
['+1', '-3', '+5', '+9']
11961196

11971197
Revisions:
1198-
- main: New.
1198+
- v1.0.0: New.
11991199

12001200
----
12011201

@@ -1431,7 +1431,7 @@ Example
14311431
'dddd'
14321432

14331433
Revisions:
1434-
- main: New.
1434+
- v1.0.0: New.
14351435

14361436
----
14371437

@@ -1452,7 +1452,7 @@ Such comparer takes two values and return positive ints when lhs > rhs, negative
14521452
if lhs < rhs, and 0 if they are equal.
14531453

14541454
Revisions:
1455-
- main: New.
1455+
- v1.0.0: New.
14561456

14571457
----
14581458

@@ -1526,7 +1526,7 @@ Returns the minimal element of the sequence based on the given key selector. Rai
15261526
`InvalidOperationError` if there is no value.
15271527

15281528
Revisions:
1529-
- main: New.
1529+
- v1.0.0: New.
15301530

15311531
----
15321532

@@ -1547,7 +1547,7 @@ Such comparer takes two values and return positive ints when lhs > rhs, negative
15471547
if lhs < rhs, and 0 if they are equal.
15481548

15491549
Revisions:
1550-
- main: New.
1550+
- v1.0.0: New.
15511551

15521552
----
15531553

@@ -2197,6 +2197,9 @@ Returns
21972197

21982198
Produces a subsequence defined by the given slice notation.
21992199

2200+
This method always uses a generic list slicing method regardless the implementation of the
2201+
wrapped iterable.
2202+
22002203
This method currently is identical to `elements_in()` when it takes a slice.
22012204

22022205
Example
@@ -2209,7 +2212,7 @@ Example
22092212
[10, 100]
22102213
22112214
Revisions:
2212-
- main: New.
2215+
- v1.0.0: New.
22132216

22142217
----
22152218

@@ -2404,7 +2407,7 @@ Example
24042407
[1, 9, -2, -7, 14, 15, -26] # abs(-2) == abs(2)
24052408

24062409
Revisions:
2407-
- main: New.
2410+
- v1.0.0: New.
24082411

24092412
----
24102413

@@ -2636,6 +2639,8 @@ Produces a subsequence defined by the given slice notation.
26362639
This method always uses a generic list slicing method regardless the implementation of the
26372640
wrapped iterable.
26382641

2642+
This method currently is identical to `take()` when it takes a slice.
2643+
26392644
Example
26402645
.. code-block:: python
26412646

doc/to-start/changelog.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@ Changelog
33

44
`GitHub Releases <https://github.com/cleoold/types-linq/releases>`_
55

6+
v1.0.0
7+
********
8+
9+
- Add enumerate(), rank() and rank_by() to MoreEnumerable class
10+
- Add chunk(), max_by(), min_by(), intersect_by() and union_by() to Enumerable class
11+
- Enumerable.element_at() now supports negative index
12+
- Enumerable.take() now supports taking a slice (which is same as Enumerable.elements_in()) to be consistent with
13+
.NET 6
14+
- Enumerable.__getitem__() now supports providing a default value
15+
- **Breaking**: Add Enumerable.distinct_by() that returns an Enumerable instance. MoreEnumerable.distinct_by() that
16+
returned a MoreEnumerable instance is removed
17+
- **Breaking**: Add Enumerable.except_by(). The previous MoreEnumerable.except_by() that took homogeneous values as
18+
the second iterable is now renamed as MoreEnumerable.except_by2()
19+
620
v0.2.1
721
********
822

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
setup(
77
name='types-linq',
8-
version='v0.2.1',
8+
version='v1.0.0',
99
url='https://github.com/cleoold/types-linq',
1010
license='BSD 2-Clause License',
1111
author='cleoold',
@@ -22,7 +22,7 @@
2222
platforms='any',
2323
classifiers=[
2424
'Topic :: Utilities',
25-
'Development Status :: 3 - Alpha',
25+
'Development Status :: 4 - Beta',
2626
'License :: OSI Approved :: BSD License',
2727
'Operating System :: OS Independent',
2828
'Programming Language :: Python :: 3',

types_linq/enumerable.pyi

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
9292
1000
9393
9494
Revisions:
95-
- main: New.
95+
- v1.0.0: New.
9696
'''
9797

9898
@overload
@@ -420,7 +420,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
420420
[6561, 19683, 59049, 177147]
421421
422422
Revisions:
423-
- main: New.
423+
- v1.0.0: New.
424424
'''
425425

426426
def concat(self, second: Iterable[TSource_co]) -> Enumerable[TSource_co]:
@@ -535,7 +535,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
535535
[1, 4, 6, 3, 99]
536536
537537
Revisions:
538-
- main: New. The method with same name (but different return type) in MoreEnumerable class
538+
- v1.0.0: New. The method with same name (but different return type) in MoreEnumerable class
539539
was removed.
540540
'''
541541

@@ -563,7 +563,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
563563
100
564564
565565
Revisions:
566-
- main: Added support for negative index.
566+
- v1.0.0: Added support for negative index.
567567
'''
568568

569569
@overload
@@ -587,7 +587,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
587587
0
588588
589589
Revisions:
590-
- main: Added support for negative index.
590+
- v1.0.0: Added support for negative index.
591591
'''
592592

593593
@staticmethod
@@ -632,7 +632,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
632632
[(16, 'x'), (16, 't')]
633633
634634
Revisions:
635-
- main: New. The method with same name (but different usage) in MoreEnumerable class was
635+
- v1.0.0: New. The method with same name (but different usage) in MoreEnumerable class was
636636
renamed as ``except_by2()`` to accommodate this.
637637
'''
638638

@@ -905,7 +905,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
905905
['+1', '-3', '+5', '+9']
906906
907907
Revisions:
908-
- main: New.
908+
- v1.0.0: New.
909909
'''
910910

911911
def join(self,
@@ -1078,7 +1078,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
10781078
'dddd'
10791079
10801080
Revisions:
1081-
- main: New.
1081+
- v1.0.0: New.
10821082
'''
10831083

10841084
@overload
@@ -1094,7 +1094,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
10941094
if lhs < rhs, and 0 if they are equal.
10951095
10961096
Revisions:
1097-
- main: New.
1097+
- v1.0.0: New.
10981098
'''
10991099

11001100
@overload
@@ -1135,7 +1135,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
11351135
`InvalidOperationError` if there is no value.
11361136
11371137
Revisions:
1138-
- main: New.
1138+
- v1.0.0: New.
11391139
'''
11401140

11411141
@overload
@@ -1151,7 +1151,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
11511151
if lhs < rhs, and 0 if they are equal.
11521152
11531153
Revisions:
1154-
- main: New.
1154+
- v1.0.0: New.
11551155
'''
11561156

11571157
def of_type(self, t_result: Type[TResult]) -> Enumerable[TResult]:
@@ -1603,6 +1603,9 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
16031603
'''
16041604
Produces a subsequence defined by the given slice notation.
16051605
1606+
This method always uses a generic list slicing method regardless the implementation of the
1607+
wrapped iterable.
1608+
16061609
This method currently is identical to `elements_in()` when it takes a slice.
16071610
16081611
Example
@@ -1615,7 +1618,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
16151618
[10, 100]
16161619
16171620
Revisions:
1618-
- main: New.
1621+
- v1.0.0: New.
16191622
'''
16201623

16211624
def take_last(self, count: int) -> Enumerable[TSource_co]:
@@ -1740,7 +1743,7 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
17401743
[1, 9, -2, -7, 14, 15, -26] # abs(-2) == abs(2)
17411744
17421745
Revisions:
1743-
- main: New.
1746+
- v1.0.0: New.
17441747
'''
17451748

17461749
def where(self, predicate: Callable[[TSource_co], bool]) -> Enumerable[TSource_co]:
@@ -1902,6 +1905,8 @@ class Enumerable(Sequence[TSource_co], Generic[TSource_co]):
19021905
This method always uses a generic list slicing method regardless the implementation of the
19031906
wrapped iterable.
19041907
1908+
This method currently is identical to `take()` when it takes a slice.
1909+
19051910
Example
19061911
.. code-block:: python
19071912

0 commit comments

Comments
 (0)