Update pre-commit config

The prettier hook was missing a trailing slash so omitting css files.

Add a trailing space fix hook and fix issues.
This commit is contained in:
Calum Lind 2018-10-08 14:22:49 +01:00
parent 654e2af4e5
commit 20fa106b8b
12 changed files with 48 additions and 46 deletions

View File

@ -14,7 +14,7 @@ repos:
hooks:
- id: prettier
name: Fmt Prettier
files: "\\.(
files: "\\.(\
css\
|less\
|scss\
@ -35,8 +35,10 @@ repos:
name: Fix End-of-files
exclude_types: [javascript, css]
- id: mixed-line-ending
name: Fix Line-endings
name: Fix Line endings
args: [--fix=auto]
- id: trailing-whitespace
name: Fix Trailing whitespace
- id: flake8
name: Chk Flake8
additional_dependencies:

View File

@ -10,7 +10,7 @@ Authors:
Andrew Resch
Damien Churchill
For contributors and past developers see:
For contributors and past developers see:
AUTHORS
==========================

View File

@ -83,7 +83,7 @@ Ext.ux.form.FileUploadField = Ext.extend(Ext.form.TextField, {
this.bindListeners();
this.resizeEl = this.positionEl = this.wrap;
},
bindListeners: function(){
this.fileInput.on({
scope: this,
@ -102,11 +102,11 @@ Ext.ux.form.FileUploadField = Ext.extend(Ext.form.TextField, {
change: function(){
var v = this.fileInput.dom.value;
this.setValue(v);
this.fireEvent('fileselected', this, v);
this.fireEvent('fileselected', this, v);
}
});
});
},
createFileInput : function() {
this.fileInput = this.wrap.createChild({
id: this.getFileInputId(),
@ -117,7 +117,7 @@ Ext.ux.form.FileUploadField = Ext.extend(Ext.form.TextField, {
size: 1
});
},
reset : function(){
if (this.rendered) {
this.fileInput.remove();
@ -149,18 +149,18 @@ Ext.ux.form.FileUploadField = Ext.extend(Ext.form.TextField, {
Ext.ux.form.FileUploadField.superclass.onDestroy.call(this);
Ext.destroy(this.fileInput, this.button, this.wrap);
},
onDisable: function(){
Ext.ux.form.FileUploadField.superclass.onDisable.call(this);
this.doDisable(true);
},
onEnable: function(){
Ext.ux.form.FileUploadField.superclass.onEnable.call(this);
this.doDisable(false);
},
// private
doDisable: function(disabled){
this.fileInput.dom.disabled = disabled;
@ -184,7 +184,7 @@ Ext.reg('fileuploadfield', Ext.ux.form.FileUploadField);
Ext.form.FileUploadField = Ext.ux.form.FileUploadField;
/*!
* Ext.ux.form.RadioGroup.js
*
*
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
@ -294,7 +294,7 @@ Ext.reg('spinnerfield', Ext.ux.form.SpinnerField);
Ext.form.SpinnerField = Ext.ux.form.SpinnerField;
/*!
* Ext.ux.form.SpinnerField.js
*
*
* Copyright (c) Damien Churchill 2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
@ -506,7 +506,7 @@ Ext.ux.form.SpinnerGroup = Ext.extend(Ext.form.CheckboxGroup, {
Ext.reg('spinnergroup', Ext.ux.form.SpinnerGroup);
/*!
* Ext.ux.form.ToggleField.js
*
*
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
@ -823,7 +823,7 @@ Ext.ux.grid.BufferView = Ext.extend(Ext.grid.GridView, {
});
/*!
* Ext.ux.layout.FormLayoutFix.js
*
*
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
@ -857,7 +857,7 @@ Ext.override(Ext.layout.FormLayout, {
});
/*!
* Ext.ux.tree.MultiSelectionModelFix.js
*
*
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
@ -870,7 +870,7 @@ Ext.override(Ext.layout.FormLayout, {
* @author Damien Churchill <damoxc@gmail.com>
*/
Ext.override(Ext.tree.MultiSelectionModel, {
onNodeClick: function (node, e) {
if (e.ctrlKey && this.isSelected(node)) {
this.unselect(node);
@ -909,11 +909,11 @@ Ext.override(Ext.tree.MultiSelectionModel, {
select: function(node, e, keepExisting, suppressEvent) {
if(keepExisting !== true){
this.clearSelections(true);
}
}
if(this.isSelected(node)){
this.lastSelNode = node;
return node;
}
}
this.selNodes.push(node);
this.selMap[node.id] = node;
this.lastSelNode = node;
@ -1382,18 +1382,18 @@ Ext.tree.ColumnResizer = Ext.extend(Ext.util.Observable, {
var hw = 5,
x = e.getPageX(),
hd = e.getTarget('.x-treegrid-hd', 3, true);
if(hd){
if(hd){
var r = hd.getRegion(),
ss = hd.dom.style,
pn = hd.dom.parentNode;
if(x - r.left <= hw && hd.dom !== pn.firstChild) {
var ps = hd.dom.previousSibling;
while(ps && Ext.fly(ps).hasClass('x-treegrid-hd-hidden')) {
ps = ps.previousSibling;
}
if(ps) {
if(ps) {
this.activeHd = Ext.get(ps);
ss.cursor = Ext.isWebKit ? 'e-resize' : 'col-resize';
}
@ -1404,7 +1404,7 @@ Ext.tree.ColumnResizer = Ext.extend(Ext.util.Observable, {
}
if(ns) {
this.activeHd = Ext.get(ns);
ss.cursor = Ext.isWebKit ? 'w-resize' : 'col-resize';
ss.cursor = Ext.isWebKit ? 'w-resize' : 'col-resize';
}
} else{
delete this.activeHd;
@ -1444,13 +1444,13 @@ Ext.tree.ColumnResizer = Ext.extend(Ext.util.Observable, {
var nw = this.proxy.getWidth(),
tree = this.tree,
disabled = this.dragHeadersDisabled;
this.proxy.remove();
delete this.dragHd;
tree.columns[this.hdIndex].width = nw;
tree.updateColumnWidths();
setTimeout(function(){
tree.headersDisabled = disabled;
}, 100);
@ -1619,7 +1619,7 @@ Ext.ux.tree.TreeGridRootNodeUI = Ext.extend(Ext.tree.TreeNodeUI, {
expand : Ext.emptyFn
});/*!
* Ext.ux.tree.TreeGridNodeUIFix.js
*
*
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
@ -1631,7 +1631,7 @@ Ext.override(Ext.ux.tree.TreeGridNodeUI, {
updateColumns: function() {
if (!this.rendered) return;
var a = this.node.attributes,
t = this.node.getOwnerTree(),
cols = t.columns,
@ -1649,7 +1649,7 @@ Ext.override(Ext.ux.tree.TreeGridNodeUI, {
});
Ext.tree.RenderColumn = Ext.extend(Ext.tree.Column, {
constructor: function(c) {
c.tpl = c.tpl || new Ext.XTemplate('{' + c.dataIndex + ':this.format}');
c.tpl.format = c.renderer;

View File

@ -1,6 +1,6 @@
/*!
* Ext.ux.form.RadioGroup.js
*
*
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with

View File

@ -1,6 +1,6 @@
/*!
* Ext.ux.form.SpinnerField.js
*
*
* Copyright (c) Damien Churchill 2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with

View File

@ -1,6 +1,6 @@
/*!
* Ext.ux.form.ToggleField.js
*
*
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with

View File

@ -1,6 +1,6 @@
/*!
* Ext.ux.layout.FormLayoutFix.js
*
*
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with

View File

@ -1,6 +1,6 @@
/*!
* Ext.ux.tree.MultiSelectionModelFix.js
*
*
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with

View File

@ -1,6 +1,6 @@
/*!
* Ext.ux.tree.TreeGridNodeUIFix.js
*
*
* Copyright (c) Damien Churchill 2009-2010 <damoxc@gmail.com>
*
* This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with

View File

@ -5,9 +5,9 @@ Message Formats
---------------
DelugeRPC is a protocol used for daemon/client communication. There are four
types of messages involved in the protocol: RPC Request, RPC Response,
RPC Error and Event. All messages are zlib compressed rencoded strings and
RPC Error and Event. All messages are zlib compressed rencoded strings and
their data formats are detailed below.
"""""""""""
RPC Request
"""""""""""
@ -28,7 +28,7 @@ remote method be called. Multiple requests can be bundled in a list.
call other objects or plugins methods.
**args** (list)
The arguments to call the method with.
The arguments to call the method with.
**kwargs** (dict)
The keyword arguments to call the method with.
@ -38,7 +38,7 @@ RPC Response
""""""""""""
This message is created and sent in response to a RPC Request from a client. It
will hold the return value of the requested method call. In the case of an
error, a RPC Error message will be sent instead.
error, a RPC Error message will be sent instead.
**[message_type, request_id, [return_value]]**
@ -49,7 +49,7 @@ error, a RPC Error message will be sent instead.
**request_id** (int)
The request_id is the same as the one sent by the client in the initial
request. It used on the client side to determine what message this is in
response to.
response to.
**return_value** (list)
The return value of the method call.
@ -58,7 +58,7 @@ error, a RPC Error message will be sent instead.
RPC Error
"""""""""
This message is created in response to an error generated while processing a
RPC Request and will serve as a replacement for a RPC Response message.
RPC Request and will serve as a replacement for a RPC Response message.
**[message_type, request_id, exception_type, exception_msg, traceback]**
@ -83,7 +83,7 @@ Event
"""""
This message is created by the daemon and sent to the clients without being in
response to a RPC Request. Events are generally sent for changes in the
daemon's state that the clients need to be made aware of.
daemon's state that the clients need to be made aware of.
**[message_type, event_name, data]**

View File

@ -9,11 +9,11 @@ the ExtJS framework, running on top of a Twisted webserver.
SSL Configuration
=================
By default the web interface will use the same private key and certificate as
the Deluge daemon. If you wish to use a different certificate/key (see
the Deluge daemon. If you wish to use a different certificate/key (see
`How to Create a SSL Certificate <http://www.yatblog.com/2007/02/27/how-to-create-a-ssl-certificate/>`_
for information on creating one) you are able to specify which you want to use.
There are 2 ways to enable SSL encryption in the webserver, 1 is to specify it
in your configuration (accessible via the Preferences window). The other is to
add '--ssl' when running the webserver, which will override the configuration
value and enable SSL.
value and enable SSL.

View File

@ -7,4 +7,4 @@ style "user-font"
{
font_name="Arial Unicode MS"
}
widget_class "*" style "user-font"
widget_class "*" style "user-font"