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