add line-to-long check

This commit is contained in:
Job Evers-Meltzer 2016-11-30 17:05:01 -06:00
parent b64fa51567
commit afba045c29
6 changed files with 21 additions and 11 deletions

View file

@ -55,7 +55,8 @@ class LBRYDaemonApp(AppKit.NSApplication):
def openui_(self, sender):
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):
if reactor.running:
log.info('Stopping twisted event loop')

View file

@ -12,7 +12,8 @@ def LBRYNotify(message):
notification.setInformativeText_(message)
notification.setUserInfo_({})
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)
@ -25,5 +26,6 @@ def notify(title, subtitle, info_text, delay=0, sound=False, userInfo=None):
notification.setUserInfo_(userInfo)
if sound:
notification.setSoundName_("NSUserNotificationDefaultSoundName")
notification.setDeliveryDate_(Foundation.NSDate.dateWithTimeInterval_sinceDate_(delay, Foundation.NSDate.date()))
NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification_(notification)
notification.setDeliveryDate_(
Foundation.NSDate.dateWithTimeInterval_sinceDate_(delay, Foundation.NSDate.date()))
NSUserNotificationCenter.defaultUserNotificationCenter().scheduleNotification_(notification)

View file

@ -60,8 +60,7 @@ pip install -r requirements.txt
pip install pyOpenSSL
pip install pylint
pylint -E --disable=inherit-non-class --disable=no-member --ignored-modules=distutils \
--enable=unused-import --enable=bad-whitespace lbrynet packaging/osx/lbry-osx-app/lbrygui/
./run_pylint.sh packaging/osx/lbry-osx-app/lbrygui/
python setup.py install

View file

@ -43,7 +43,4 @@ pip install mock pylint coveralls
coverage run --source=lbrynet `which trial` tests
coveralls
# 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 lbrynet
./run_pylint.sh

View file

@ -2,5 +2,5 @@ C:\Python27\Scripts\pip.exe install mock
C:\Python27\Scripts\pip.exe install pylint
C:\Python27\python.exe C:\Python27\Scripts\trial.py C:\projects\lbry\tests\unit
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) }

11
run_pylint.sh Executable file
View 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 $@