Skip to content

Commit

Permalink
Update changelog, version, and some infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
facelessuser committed Jan 31, 2021
1 parent 6d0dbd9 commit 435efc5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docs/src/markdown/about/changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 2.7.2

- **FIX**: Add note in `--help` option about `--source` behavior.
- **FIX**: Better documentation on language options and Unicode normalization in international languages.

## 2.7.1

- **FIX**: Allow camel case options in Aspell.
Expand Down
7 changes: 5 additions & 2 deletions pyspelling/__meta__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,14 @@ def _get_canonical(self):
return ver


def parse_version(ver, pre=False):
def parse_version(ver):
"""Parse version into a comparable Version tuple."""

m = RE_VER.match(ver)

if m is None:
raise ValueError("'{}' is not a valid version".format(ver))

# Handle major, minor, micro
major = int(m.group('major'))
minor = int(m.group('minor')) if m.group('minor') else 0
Expand Down Expand Up @@ -185,5 +188,5 @@ def parse_version(ver, pre=False):
return Version(major, minor, micro, release, pre, post, dev)


__version_info__ = Version(2, 7, 1, "final")
__version_info__ = Version(2, 7, 2, "final")
__version__ = __version_info__._get_canonical()
2 changes: 2 additions & 0 deletions tests/test_versions.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,5 @@ def test_asserts(self):
Version(1, 2, 3, pre=1)
with self.assertRaises(ValueError):
Version(1, 2, 3, dev=1)
with self.assertRaises(ValueError):
parse_version('bad&version')

0 comments on commit 435efc5

Please sign in to comment.