Skip to content

Commit 450bc3c

Browse files
author
Worvast
authored
Merge pull request DevoInc#25 from Worvast/master
[3.0.1] - 2020-06-30
2 parents 0008113 + 0c71009 commit 450bc3c

4 files changed

Lines changed: 16 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
66

7+
## [3.0.1] - 2020-06-30
8+
9+
#### Fixed
10+
* Sorter regex parser now accept group != 0
11+
712
## [3.0.0] - 2020-04-28
813
#### Added
914
* Faker
@@ -22,6 +27,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
2227
* Update dependencies to a new majors versions
2328
* Set dependencies to fixed versions (more maintenance, but much more security and reliability)
2429
* Sorter
30+
* Sorter now accept file encoding for write/read
2531
* file_sorted_join moved from devoutils.sorter to devoutils.fileio
2632
* Remove Python 2 compatibility
2733
* Faker

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[![relese-next Build Status](https://travis-ci.com/DevoInc/python-utils.svg?branch=master)](https://travis-ci.com/DevoInc/python-utils) [![LICENSE](https://img.shields.io/dub/l/vibe-d.svg)](https://github.com/DevoInc/python-utils/blob/master/LICENSE)
22

3-
[![wheel](https://img.shields.io/badge/wheel-yes-brightgreen.svg)](https://pypi.org/project/devo-utils/) [![version](https://img.shields.io/badge/version-3.0.0-blue.svg)](https://pypi.org/project/devo-utils/) [![python](https://img.shields.io/badge/python-3.5%20%7C%203.6%20%7C%203.7%20%7C%203.8-blue.svg)](https://pypi.org/project/devo-utils/)
3+
[![wheel](https://img.shields.io/badge/wheel-yes-brightgreen.svg)](https://pypi.org/project/devo-utils/) [![version](https://img.shields.io/badge/version-3.0.1-blue.svg)](https://pypi.org/project/devo-utils/) [![python](https://img.shields.io/badge/python-3.5%20%7C%203.6%20%7C%203.7%20%7C%203.8-blue.svg)](https://pypi.org/project/devo-utils/)
44

55

66
# Devo Python Utils

devoutils/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
__description__ = 'Devo Python Library.'
22
__url__ = 'http://www.devo.com'
3-
__version__ = "3.0.0"
3+
__version__ = "3.0.1"
44
__author__ = 'Devo'
55
__author_email__ = '[email protected]'
66
__license__ = 'MIT'

devoutils/sorter/parser.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,11 @@ def parser_regex(regex, group, ignorecase=False):
3636
:param ignorecase: False by default
3737
:return: the group obtained.
3838
"""
39-
if ignorecase:
40-
return lambda x: re.search(regex, x, re.I).groups()[group]
41-
return lambda x: re.search(regex, x).groups()[group]
39+
if group == 0:
40+
if ignorecase:
41+
return lambda x: re.search(regex, x, re.I).groups()[group]
42+
return lambda x: re.search(regex, x).groups()[group]
43+
else:
44+
if ignorecase:
45+
return lambda x: re.findall(regex, x, re.I)[group]
46+
return lambda x: re.findall(regex, x)[group]

0 commit comments

Comments
 (0)