Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Games
Kajongg
Commits
455a2481
Commit
455a2481
authored
Apr 07, 2021
by
Wolfgang Rohdewald
Browse files
pylint: comparisons
parent
fbae2067
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/game.py
View file @
455a2481
...
...
@@ -740,7 +740,7 @@ class Game:
self
.
debug
(
' %s'
%
(
line
))
for
player2
in
self
.
players
:
if
id
(
player1
)
!=
id
(
player2
):
if
player1
.
wind
==
East
or
player2
.
wind
==
East
:
if
East
in
(
player1
.
wind
,
player2
.
wind
)
:
efactor
=
2
else
:
efactor
=
1
...
...
@@ -891,7 +891,7 @@ class PlayingGame(Game):
else
:
host
=
None
if
seed
==
'proposed'
or
seed
==
host
:
if
seed
in
(
'proposed'
,
host
)
:
# we reserved the game id by writing a record with seed == host
Game
.
saveStartTime
(
self
)
...
...
src/query.py
View file @
455a2481
...
...
@@ -198,7 +198,7 @@ class DBHandle(sqlite3.Connection):
@
staticmethod
def
hasTable
(
table
):
"""does the table contain table?"""
return
bool
(
len
(
Query
(
'SELECT name FROM sqlite_master WHERE type="table" AND name="%s"'
%
table
).
records
)
)
return
len
(
Query
(
'SELECT name FROM sqlite_master WHERE type="table" AND name="%s"'
%
table
).
records
)
>
0
def
tableHasField
(
self
,
table
,
field
):
"""does the table contain a column named field?"""
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment