Skip to content
This repository has been archived by the owner on May 31, 2020. It is now read-only.

Commit

Permalink
Linting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
abonie committed Aug 20, 2017
1 parent f5c7f09 commit a6caeb3
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 72 deletions.
8 changes: 4 additions & 4 deletions batavia/core/types/NoneType.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ NoneType.prototype.__setattr__ = function(attr, value) {
**************************************************/

NoneType.prototype.__lt__ = function(other) {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand All @@ -66,7 +66,7 @@ NoneType.prototype.__lt__ = function(other) {
}

NoneType.prototype.__le__ = function(other) {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand All @@ -91,7 +91,7 @@ NoneType.prototype.__ne__ = function(other) {
}

NoneType.prototype.__gt__ = function(other) {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand All @@ -108,7 +108,7 @@ NoneType.prototype.__gt__ = function(other) {
}

NoneType.prototype.__ge__ = function(other) {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand Down
8 changes: 4 additions & 4 deletions batavia/core/types/NotImplementedType.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ NotImplementedType.prototype.__str__ = function() {
**************************************************/

NotImplementedType.prototype.__lt__ = function(other) {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand All @@ -60,7 +60,7 @@ NotImplementedType.prototype.__lt__ = function(other) {
}

NotImplementedType.prototype.__le__ = function(other) {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand All @@ -85,7 +85,7 @@ NotImplementedType.prototype.__ne__ = function(other) {
}

NotImplementedType.prototype.__gt__ = function(other) {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand All @@ -102,7 +102,7 @@ NotImplementedType.prototype.__gt__ = function(other) {
}

NotImplementedType.prototype.__ge__ = function(other) {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand Down
21 changes: 10 additions & 11 deletions batavia/types/Bytes.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ Bytes.prototype.__lt__ = function(other) {
)
case constants.BATAVIA_MAGIC_36:
throw new exceptions.TypeError.$pyclass(
"'<' not supported between instances of 'bytes' and '"
+ type_name(other) + "'"
"'<' not supported between instances of 'bytes' and '" +
type_name(other) + "'"
)
}
}
Expand All @@ -122,8 +122,8 @@ Bytes.prototype.__le__ = function(other) {
)
case constants.BATAVIA_MAGIC_36:
throw new exceptions.TypeError.$pyclass(
"'<=' not supported between instances of 'bytes' and '"
+ type_name(other) + "'"
"'<=' not supported between instances of 'bytes' and '" +
type_name(other) + "'"
)
}
}
Expand Down Expand Up @@ -163,8 +163,8 @@ Bytes.prototype.__gt__ = function(other) {
)
case constants.BATAVIA_MAGIC_36:
throw new exceptions.TypeError.$pyclass(
"'>' not supported between instances of 'bytes' and '"
+ type_name(other) + "'"
"'>' not supported between instances of 'bytes' and '" +
type_name(other) + "'"
)
}
}
Expand All @@ -186,8 +186,8 @@ Bytes.prototype.__ge__ = function(other) {
)
case constants.BATAVIA_MAGIC_36:
throw new exceptions.TypeError.$pyclass(
"'>=' not supported between instances of 'bytes' and '"
+ type_name(other) + "'"
"'>=' not supported between instances of 'bytes' and '" +
type_name(other) + "'"
)
}
}
Expand Down Expand Up @@ -332,7 +332,7 @@ Bytes.prototype.__add__ = function(other) {
types.Str,
types.Tuple ])) {
// does not concat with all these
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand All @@ -342,10 +342,9 @@ Bytes.prototype.__add__ = function(other) {
)
case constants.BATAVIA_MAGIC_36:
throw new exceptions.TypeError.$pyclass(
"can't concat " + type_name(other) + " to bytes"
"can't concat " + type_name(other) + ' to bytes'
)
}

} else {
throw new exceptions.NotImplementedError.$pyclass('Bytes.__add__ has not been implemented')
}
Expand Down
9 changes: 4 additions & 5 deletions batavia/types/Complex.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
var PyObject = require('../core').Object
var exceptions = require('../core').exceptions
var constants = require('../core').constants
var constants = require('../core').constants
var type_name = require('../core').type_name
var create_pyclass = require('../core').create_pyclass

Expand Down Expand Up @@ -151,7 +150,7 @@ Complex.prototype.__str__ = function() {
**************************************************/

Complex.prototype.__lt__ = function(other) {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand All @@ -167,7 +166,7 @@ Complex.prototype.__lt__ = function(other) {
}

Complex.prototype.__le__ = function(other) {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand Down Expand Up @@ -209,7 +208,7 @@ Complex.prototype.__ne__ = function(other) {
}

Complex.prototype.__gt__ = function(other) {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand All @@ -225,7 +224,7 @@ Complex.prototype.__gt__ = function(other) {
}

Complex.prototype.__ge__ = function(other) {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand Down
16 changes: 8 additions & 8 deletions batavia/types/Float.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ Float.prototype.__lt__ = function(other) {
)
case constants.BATAVIA_MAGIC_36:
throw new exceptions.TypeError.$pyclass(
"'<' not supported between instances of 'float' and '"
+ type_name(other) + "'"
"'<' not supported between instances of 'float' and '" +
type_name(other) + "'"
)
}
} else {
Expand Down Expand Up @@ -146,8 +146,8 @@ Float.prototype.__le__ = function(other) {
)
case constants.BATAVIA_MAGIC_36:
throw new exceptions.TypeError.$pyclass(
"'<=' not supported between instances of 'float' and '"
+ type_name(other) + "'"
"'<=' not supported between instances of 'float' and '" +
type_name(other) + "'"
)
}
} else {
Expand Down Expand Up @@ -214,8 +214,8 @@ Float.prototype.__gt__ = function(other) {
)
case constants.BATAVIA_MAGIC_36:
throw new exceptions.TypeError.$pyclass(
"'>' not supported between instances of 'float' and '"
+ type_name(other) + "'"
"'>' not supported between instances of 'float' and '" +
type_name(other) + "'"
)
}
} else {
Expand Down Expand Up @@ -257,8 +257,8 @@ Float.prototype.__ge__ = function(other) {
)
case constants.BATAVIA_MAGIC_36:
throw new exceptions.TypeError.$pyclass(
"'>=' not supported between instances of 'float' and '"
+ type_name(other) + "'"
"'>=' not supported between instances of 'float' and '" +
type_name(other) + "'"
)
}
} else {
Expand Down
8 changes: 4 additions & 4 deletions batavia/types/FrozenSet.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ FrozenSet.prototype.__lt__ = function(other) {
return new types.Bool(this.data.keys().length < other.data.keys().length)
}

switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand All @@ -93,7 +93,7 @@ FrozenSet.prototype.__le__ = function(other) {
if (types.isinstance(other, [types.Set, types.FrozenSet])) {
return new types.Bool(this.data.keys().length <= other.data.keys().length)
}
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand Down Expand Up @@ -137,7 +137,7 @@ FrozenSet.prototype.__gt__ = function(other) {
if (types.isinstance(other, [types.Set, types.FrozenSet])) {
return new types.Bool(this.data.keys().length > other.data.keys().length)
}
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand All @@ -158,7 +158,7 @@ FrozenSet.prototype.__ge__ = function(other) {
if (types.isinstance(other, [types.Set, types.FrozenSet])) {
return new types.Bool(this.data.keys().length >= other.data.keys().length)
}
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand Down
16 changes: 8 additions & 8 deletions batavia/types/JSDict.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ JSDict.prototype.__lt__ = function(other) {
types.Int, types.JSDict, types.List,
types.NoneType, types.Str, types.Tuple
])) {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand All @@ -83,7 +83,7 @@ JSDict.prototype.__lt__ = function(other) {
return this.valueOf() < other.valueOf()
}
}
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand All @@ -107,7 +107,7 @@ JSDict.prototype.__le__ = function(other) {
types.Int, types.JSDict, types.List,
types.NoneType, types.Str, types.Tuple
])) {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand All @@ -124,7 +124,7 @@ JSDict.prototype.__le__ = function(other) {
return this.valueOf() <= other.valueOf()
}
}
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand Down Expand Up @@ -157,7 +157,7 @@ JSDict.prototype.__gt__ = function(other) {
types.NoneType, types.Set, types.Str,
types.Tuple
])) {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand All @@ -174,7 +174,7 @@ JSDict.prototype.__gt__ = function(other) {
return this.valueOf() > other.valueOf()
}
} else {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand All @@ -199,7 +199,7 @@ JSDict.prototype.__ge__ = function(other) {
types.Int, types.JSDict, types.List,
types.NoneType, types.Str, types.Tuple
])) {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand All @@ -216,7 +216,7 @@ JSDict.prototype.__ge__ = function(other) {
return this.valueOf() >= other.valueOf()
}
} else {
switch(constants.BATAVIA_MAGIC) {
switch (constants.BATAVIA_MAGIC) {
case constants.BATAVIA_MAGIC_34:
case constants.BATAVIA_MAGIC_35a0:
case constants.BATAVIA_MAGIC_35:
Expand Down
Loading

0 comments on commit a6caeb3

Please sign in to comment.