add line-to-long check
This commit is contained in:
parent
b64fa51567
commit
afba045c29
6 changed files with 21 additions and 11 deletions
|
@ -55,7 +55,8 @@ class LBRYDaemonApp(AppKit.NSApplication):
|
||||||
def openui_(self, sender):
|
def openui_(self, sender):
|
||||||
webbrowser.open(settings.UI_ADDRESS)
|
webbrowser.open(settings.UI_ADDRESS)
|
||||||
|
|
||||||
# this code is from the example https://pythonhosted.org/pyobjc/examples/Cocoa/Twisted/WebServicesTool/index.html
|
# this code is from the example
|
||||||
|
# https://pythonhosted.org/pyobjc/examples/Cocoa/Twisted/WebServicesTool/index.html
|
||||||
def applicationShouldTerminate_(self, sender):
|
def applicationShouldTerminate_(self, sender):
|
||||||
if reactor.running:
|
if reactor.running:
|
||||||
log.info('Stopping twisted event loop')
|
log.info('Stopping twisted event loop')
|
||||||
|
|
|
@ -12,7 +12,8 @@ def LBRYNotify(message):
|
||||||
notification.setInformativeText_(message)
|
notification.setInformativeText_(message)
|
||||||
notification.setUserInfo_({})
|
notification.setUserInfo_({})
|
||||||
notification.setSoundName_("NSUserNotificationDefaultSoundName")
|
notification.setSoundName_("NSUserNotificationDefaultSoundName")
|
||||||
notification.setDeliveryDate_(Foundation.NSDate.dateWithTimeInterval_sinceDate_(0, Foundation.NSDate.date()))
|
notification.setDeliveryDate_(
|
||||||
|
Foundation.NSDate.dateWithTimeInterval_sinceDate_(0, Foundation.NSDate.date()))
|
||||||
NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification_(notification)
|
NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification_(notification)
|
||||||
|
|
||||||
|
|
||||||
|
@ -25,5 +26,6 @@ def notify(title, subtitle, info_text, delay=0, sound=False, userInfo=None):
|
||||||
notification.setUserInfo_(userInfo)
|
notification.setUserInfo_(userInfo)
|
||||||
if sound:
|
if sound:
|
||||||
notification.setSoundName_("NSUserNotificationDefaultSoundName")
|
notification.setSoundName_("NSUserNotificationDefaultSoundName")
|
||||||
notification.setDeliveryDate_(Foundation.NSDate.dateWithTimeInterval_sinceDate_(delay, Foundation.NSDate.date()))
|
notification.setDeliveryDate_(
|
||||||
NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification_(notification)
|
Foundation.NSDate.dateWithTimeInterval_sinceDate_(delay, Foundation.NSDate.date()))
|
||||||
|
NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification_(notification)
|
||||||
|
|
|
@ -60,8 +60,7 @@ pip install -r requirements.txt
|
||||||
pip install pyOpenSSL
|
pip install pyOpenSSL
|
||||||
|
|
||||||
pip install pylint
|
pip install pylint
|
||||||
pylint -E --disable=inherit-non-class --disable=no-member --ignored-modules=distutils \
|
./run_pylint.sh packaging/osx/lbry-osx-app/lbrygui/
|
||||||
--enable=unused-import --enable=bad-whitespace lbrynet packaging/osx/lbry-osx-app/lbrygui/
|
|
||||||
|
|
||||||
python setup.py install
|
python setup.py install
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,4 @@ pip install mock pylint coveralls
|
||||||
coverage run --source=lbrynet `which trial` tests
|
coverage run --source=lbrynet `which trial` tests
|
||||||
coveralls
|
coveralls
|
||||||
|
|
||||||
# Ignoring distutils because: https://github.com/PyCQA/pylint/issues/73
|
./run_pylint.sh
|
||||||
# TODO: as code quality improves, make pylint be more strict
|
|
||||||
pylint -E --disable=inherit-non-class --disable=no-member --ignored-modules=distutils \
|
|
||||||
--enable=unused-import --enable=bad-whitespace lbrynet
|
|
||||||
|
|
|
@ -2,5 +2,5 @@ C:\Python27\Scripts\pip.exe install mock
|
||||||
C:\Python27\Scripts\pip.exe install pylint
|
C:\Python27\Scripts\pip.exe install pylint
|
||||||
C:\Python27\python.exe C:\Python27\Scripts\trial.py C:\projects\lbry\tests\unit
|
C:\Python27\python.exe C:\Python27\Scripts\trial.py C:\projects\lbry\tests\unit
|
||||||
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
||||||
C:\Python27\Scripts\pylint.exe -E --disable=inherit-non-class --disable=no-member --ignored-modules=distutils --enable=unused-import --enable=bad-whitespace lbrynet packaging/windows/lbry-win32-app/LBRYWin32App.py
|
C:\Python27\Scripts\pylint.exe -E --disable=inherit-non-class --disable=no-member --ignored-modules=distutils --enable=unused-import --enable=bad-whitespace --enable=line-too-long lbrynet packaging/windows/lbry-win32-app/LBRYWin32App.py
|
||||||
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
if ($LastExitCode -ne 0) { $host.SetShouldExit($LastExitCode) }
|
||||||
|
|
11
run_pylint.sh
Executable file
11
run_pylint.sh
Executable file
|
@ -0,0 +1,11 @@
|
||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
# Ignoring distutils because: https://github.com/PyCQA/pylint/issues/73
|
||||||
|
# TODO: as code quality improves, make pylint be more strict
|
||||||
|
pylint -E --disable=inherit-non-class --disable=no-member \
|
||||||
|
--ignored-modules=distutils \
|
||||||
|
--enable=unused-import \
|
||||||
|
--enable=bad-whitespace \
|
||||||
|
--enable=line-too-long \
|
||||||
|
lbrynet $@
|
Loading…
Reference in a new issue