mirror of
https://github.com/dbarzin/pandora-box.git
synced 2025-07-23 15:29:43 +02:00
code quality
This commit is contained in:
parent
e3b1884ba6
commit
7eca8b3a87
2 changed files with 31 additions and 30 deletions
16
.github/workflows/ci.yml
vendored
16
.github/workflows/ci.yml
vendored
|
@ -13,17 +13,17 @@ jobs:
|
|||
name: Quality check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
path: main
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@master
|
||||
with:
|
||||
python-version: 3.8
|
||||
|
||||
- name: Wemake Python Stylguide
|
||||
uses: wemake-services/wemake-python-styleguide@0.13.4
|
||||
continue-on-error: true
|
||||
with:
|
||||
reporter: 'github-pr-review'
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
- name: code quality checkout
|
||||
run: |
|
||||
pip install pylint
|
||||
pylint ./pandora-box.py
|
||||
|
|
|
@ -21,7 +21,6 @@ import curses
|
|||
from curses import wrapper
|
||||
import pypandora
|
||||
import time
|
||||
import sys
|
||||
import pyudev
|
||||
import psutil
|
||||
import os
|
||||
|
@ -93,7 +92,9 @@ def display_image(status):
|
|||
# display image
|
||||
if "*" in image:
|
||||
# slide show
|
||||
os.system("fim -qa -c 'while(1){display;sleep 1;next;}' %s </dev/null 2>/dev/null >/dev/null &" % image)
|
||||
os.system("fim -qa -c 'while(1){display;sleep 1;next;}' %s "\
|
||||
"</dev/null 2>/dev/null >/dev/null &"
|
||||
% image)
|
||||
else :
|
||||
# only one image
|
||||
os.system("fim -qa %s </dev/null 2>/dev/null >/dev/null &" % image)
|
||||
|
@ -103,12 +104,12 @@ def display_image(status):
|
|||
|
||||
def waitMouseClick():
|
||||
mouse = open( "/dev/input/mice", "rb" )
|
||||
down = False;
|
||||
down = False
|
||||
while True:
|
||||
buf = mouse.read(3)
|
||||
if ((buf[0] & 0x1)==1):
|
||||
if (buf[0] & 0x1)==1:
|
||||
down = True
|
||||
if (((buf[0] & 0x1)==0) and down):
|
||||
if ((buf[0] & 0x1)==0) and down:
|
||||
break;
|
||||
mouse.close()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue