Skip to content

Commit

Permalink
Up to date with GraphQL.js 16.0.0rc2 now
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Sep 29, 2021
1 parent ce98196 commit 4f69c9b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/graphql/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

version = "3.2.0rc1"

version_js = "16.0.0rc1"
version_js = "16.0.0rc2"


_re_version = re.compile(r"(\d+)\.(\d+)\.(\d+)(\D*)(\d*)")
Expand Down Expand Up @@ -40,7 +40,10 @@ def __str__(self) -> str:
v = f"{self.major}.{self.minor}.{self.micro}"
level = self.releaselevel
if level and level != "final":
v = f"{v}{level[:1]}{self.serial}"
level = level[:1]
if level == "c":
level = "rc"
v = f"{v}{level}{self.serial}"
return v


Expand Down
6 changes: 3 additions & 3 deletions tests/test_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
version_info_js,
)

_re_version = re.compile(r"(\d+)\.(\d+)\.(\d+)(?:(a|b|c)(\d+))?$")
_re_version = re.compile(r"(\d+)\.(\d+)\.(\d+)(?:(a|b|r?c)(\d+))?$")


def describe_version():
Expand Down Expand Up @@ -77,7 +77,7 @@ def version_info_has_correct_fields():
if groups[3] is None: # pragma: no cover
assert groups[4] is None
else: # pragma: no cover
assert version_info.releaselevel[:1] == groups[3]
assert version_info.releaselevel[:1] == groups[3].lstrip("r")
assert version_info.serial == int(groups[4])

def describe_graphql_js_version():
Expand All @@ -103,5 +103,5 @@ def version_info_js_has_correct_fields():
if groups[3] is None: # pragma: no cover
assert groups[4] is None
else: # pragma: no cover
assert version_info_js.releaselevel[:1] == groups[3]
assert version_info_js.releaselevel[:1] == groups[3].lstrip("r")
assert version_info_js.serial == int(groups[4])

0 comments on commit 4f69c9b

Please sign in to comment.