Skip to content

Commit 1b07319

Browse files
committed
Flake8 settings
1 parent 280c134 commit 1b07319

File tree

9 files changed

+26
-23
lines changed

9 files changed

+26
-23
lines changed

computercraft/subapis/fs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,6 @@ async def getDir(self, path: str) -> str:
113113
return str_return(await self._send('getDir', path))
114114

115115
async def complete(
116-
self, partialName: str, path: str, includeFiles: bool=None, includeSlashes: bool=None
116+
self, partialName: str, path: str, includeFiles: bool = None, includeSlashes: bool = None,
117117
) -> List[str]:
118118
return list_return(await self._send('complete', partialName, path, includeFiles, includeSlashes))

computercraft/subapis/gps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
class GpsAPI(BaseSubAPI):
66
_API = 'gps'
77

8-
async def locate(self, timeout: LuaNum=None, debug: bool=None) -> Optional[Tuple[int, int, int]]:
8+
async def locate(self, timeout: LuaNum = None, debug: bool = None) -> Optional[Tuple[int, int, int]]:
99
r = await self._send('locate', timeout, debug)
1010
if r == [None]:
1111
return None

computercraft/subapis/rednet.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ async def open(self, side: str):
1111
async def close(self, side: str):
1212
return nil_return(await self._send('close', side))
1313

14-
async def send(self, receiverID: int, message: Any, protocol: str=None):
14+
async def send(self, receiverID: int, message: Any, protocol: str = None):
1515
return nil_return(await self._send('send', receiverID, message, protocol))
1616

17-
async def broadcast(self, message: Any, protocol: str=None):
17+
async def broadcast(self, message: Any, protocol: str = None):
1818
return nil_return(await self._send('broadcast', message, protocol))
1919

20-
async def receive(self, protocolFilter: str=None, timeout: LuaNum=None) -> int:
20+
async def receive(self, protocolFilter: str = None, timeout: LuaNum = None) -> int:
2121
return int_return(await self._send('receive', protocolFilter, timeout))
2222

2323
async def isOpen(self, side: str) -> bool:

computercraft/subapis/shell.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ async def setAlias(self, alias: str, program: str):
3535
async def clearAlias(self, alias: str):
3636
return nil_return(await self._send('clearAlias', alias))
3737

38-
async def programs(self, showHidden: bool=None) -> List[str]:
38+
async def programs(self, showHidden: bool = None) -> List[str]:
3939
return list_return(await self._send('programs', showHidden))
4040

4141
async def getRunningProgram(self) -> str:

computercraft/subapis/term.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from typing import Tuple
2-
from .base import BaseSubAPI, list_return, nil_return
2+
from .base import BaseSubAPI, nil_return
33
from .mixins import TermMixin
44

55

@@ -20,7 +20,7 @@ async def restoreCursor(self):
2020
async def getPosition(self) -> Tuple[int, int]:
2121
return tuple(await self._send('getPosition'))
2222

23-
async def reposition(self, x: int, y: int, width: int=None, height: int=None):
23+
async def reposition(self, x: int, y: int, width: int = None, height: int = None):
2424
return nil_return(await self._send('reposition', x, y, width, height))
2525

2626

computercraft/subapis/textutils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ async def tabulate(self, *rows_and_colors: Union[list, int]):
2020
async def pagedTabulate(self, *rows_and_colors: Union[list, int]):
2121
return nil_return(await self._send('pagedTabulate', *rows_and_colors))
2222

23-
async def pagedPrint(self, text: str, freeLines: int=None) -> int:
23+
async def pagedPrint(self, text: str, freeLines: int = None) -> int:
2424
return int_return(await self._send('pagedPrint', text, freeLines))
2525

26-
async def complete(self, partialName: str, environment: dict=None) -> List[str]:
26+
async def complete(self, partialName: str, environment: dict = None) -> List[str]:
2727
return list_return(await self._send('complete', partialName, environment))
2828

2929
# Questionable to implement

computercraft/subapis/turtle.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ async def select(self, slotNum: int):
3333
async def getSelectedSlot(self) -> int:
3434
return int_return(await self._send('getSelectedSlot'))
3535

36-
async def getItemCount(self, slotNum: int=None) -> int:
36+
async def getItemCount(self, slotNum: int = None) -> int:
3737
return int_return(await self._send('getItemCount', slotNum))
3838

39-
async def getItemSpace(self, slotNum: int=None) -> int:
39+
async def getItemSpace(self, slotNum: int = None) -> int:
4040
return int_return(await self._send('getItemSpace', slotNum))
4141

42-
async def getItemDetail(self, slotNum: int=None) -> dict:
42+
async def getItemDetail(self, slotNum: int = None) -> dict:
4343
return opt_dict_return(await self._send('getItemDetail', slotNum))
4444

4545
async def equipLeft(self):
@@ -66,7 +66,7 @@ async def digUp(self):
6666
async def digDown(self):
6767
return bool_success(await self._send('digDown'))
6868

69-
async def place(self, signText: str=None):
69+
async def place(self, signText: str = None):
7070
return bool_success(await self._send('place', signText))
7171

7272
async def placeUp(self):
@@ -113,25 +113,25 @@ async def compareDown(self) -> bool:
113113
async def compareTo(self, slot: int) -> bool:
114114
return bool_return(await self._send('compareTo', slot))
115115

116-
async def drop(self, count: LuaNum=None):
116+
async def drop(self, count: LuaNum = None):
117117
return bool_success(await self._send('drop', count))
118118

119-
async def dropUp(self, count: LuaNum=None):
119+
async def dropUp(self, count: LuaNum = None):
120120
return bool_success(await self._send('dropUp', count))
121121

122-
async def dropDown(self, count: LuaNum=None):
122+
async def dropDown(self, count: LuaNum = None):
123123
return bool_success(await self._send('dropDown', count))
124124

125-
async def suck(self, amount: LuaNum=None):
125+
async def suck(self, amount: LuaNum = None):
126126
return bool_success(await self._send('suck', amount))
127127

128-
async def suckUp(self, amount: LuaNum=None):
128+
async def suckUp(self, amount: LuaNum = None):
129129
return bool_success(await self._send('suckUp', amount))
130130

131-
async def suckDown(self, amount: LuaNum=None):
131+
async def suckDown(self, amount: LuaNum = None):
132132
return bool_success(await self._send('suckDown', amount))
133133

134-
async def refuel(self, quantity: LuaNum=None):
134+
async def refuel(self, quantity: LuaNum = None):
135135
return bool_success(await self._send('refuel', quantity))
136136

137137
async def getFuelLevel(self) -> LuaNum:
@@ -140,5 +140,5 @@ async def getFuelLevel(self) -> LuaNum:
140140
async def getFuelLimit(self) -> LuaNum:
141141
return number_return(await self._send('getFuelLimit'))
142142

143-
async def transferTo(self, slot: int, quantity: int=None):
143+
async def transferTo(self, slot: int, quantity: int = None):
144144
return bool_success(await self._send('transferTo', slot, quantity))

computercraft/subapis/window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ class WindowAPI(BaseSubAPI):
55
_API = 'window'
66

77
async def create(
8-
self, parentTerm: LuaTable, x: int, y: int, width: int, height: int, visible: bool=None
8+
self, parentTerm: LuaTable, x: int, y: int, width: int, height: int, visible: bool = None,
99
) -> LuaTable:
1010
# TODO
1111
return await self._send('create', parentTerm, x, y, width, height, visible)

setup.cfg

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
max-line-length = 120
3+
ignore = I,C812,N802,N803,N815

0 commit comments

Comments
 (0)