Skip to content

Commit bc4d556

Browse files
Poetry (#23)
* is to == * Update Travis * set dist * use preview poetry * tweak travis * Remove dist * Remove preview * Update poetry * update poetry * remove versions * update travis * remove install prior to deploy
1 parent 74e25c6 commit bc4d556

File tree

5 files changed

+41
-17
lines changed

5 files changed

+41
-17
lines changed

.travis.yml

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
11
language: python
22
python:
3-
- "3.4"
4-
- "3.5"
53
- "3.6"
64
- "3.7"
7-
install:
5+
- "3.8"
6+
7+
script:
8+
- coverage run -m pytest
9+
10+
after_success:
11+
- codecov
12+
13+
before_install:
814
- pip install --upgrade pip
915
- pip install poetry
16+
install:
1017
- poetry install -v
11-
# command to run tests
12-
script:
13-
- coverage run -m pytest
14-
# run coverage
15-
after_success:
16-
- codecov
18+
19+
before_deploy:
20+
# User and password environment variables are set as hidden variables through
21+
# the web interface in the project settings.
22+
- poetry config http-basic.pypi $PYPI_USERNAME $PYPI_PASSWORD
23+
- poetry build
24+
25+
deploy:
26+
provider: script
27+
script: poetry publish
28+
skip_cleanup: true
29+
on:
30+
tags: true
31+

poetry.lock

Lines changed: 13 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "rummy"
3-
version = "2.0.0"
3+
version = "2.0.1"
44
description = "Console Rummy game"
55
authors = ["Sarcoma <[email protected]>"]
66
license = "MIT"
@@ -40,5 +40,5 @@ webencodings = "0.5.1"
4040
[tool.poetry.dev-dependencies]
4141

4242
[build-system]
43-
requires = ["poetry>=0.12"]
43+
requires = ["poetry>=0.11"]
4444
build-backend = "poetry.masonry.api"

rummy/game/players.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def choose_opponents(self):
2626
self.players.append(AI(len(self.players) + 1, ai_only))
2727

2828
def is_ai_only(self):
29-
return True if self.number_of_players is 0 else False
29+
return True if self.number_of_players == 0 else False
3030

3131
def get_players(self):
3232
return self.players

rummy/ui/menu_action_dialog.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ def human_players():
1515
def ai_players(human_players=0):
1616
return ActionCollection(
1717
Action(range(
18-
1 if human_players is not 0 else 2,
18+
1 if human_players != 0 else 2,
1919
5 - int(human_players)
2020
), 'Choose number of AI players'),
2121
)

0 commit comments

Comments
 (0)