Skip to content

Commit 991f569

Browse files
committed
yay it's flake8 again
1 parent c09dbfa commit 991f569

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

examples/basic/example.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
"""
1313
from __future__ import absolute_import
1414

15-
__author__ = 'Cosmo Harrigan'
16-
1715
import logging
1816

1917
# Import the plugins you have created
@@ -22,6 +20,8 @@
2220
from spockbot import Client
2321
from spockbot.plugins import default_plugins
2422

23+
__author__ = 'Cosmo Harrigan'
24+
2525
# Change default log level to DEBUG so we can see extra messages
2626
logger = logging.getLogger('spockbot')
2727
logger.setLevel(logging.DEBUG)
@@ -37,8 +37,6 @@
3737
'username': USERNAME,
3838
'password': PASSWORD,
3939
},
40-
# xxx
41-
'auth': {'online_mode': bool(PASSWORD)},
4240
}
4341

4442
# Load the plugins.

examples/basic/example_plugin.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
- Placing blocks
1212
- Reading blocks
1313
"""
14-
15-
__author__ = 'Cosmo Harrigan, Morgan Creekmore'
16-
17-
1814
import logging
1915

2016
# Import any modules that you need in your plugin
@@ -23,7 +19,7 @@
2319
from spockbot.plugins.tools.event import EVENT_UNREGISTER
2420
from spockbot.vector import Vector3
2521

26-
# Required import
22+
__author__ = 'Cosmo Harrigan, Morgan Creekmore'
2723

2824
logger = logging.getLogger('spockbot')
2925

@@ -70,9 +66,7 @@ def perform_initial_actions(self, name, data):
7066
self.chat.chat('Bot active')
7167

7268
# Walk to target coordinates
73-
self.movement.move_to(TARGET_COORDINATES.x,
74-
TARGET_COORDINATES.y,
75-
TARGET_COORDINATES.z)
69+
self.movement.move_to(*TARGET_COORDINATES)
7670

7771
def chat_event_handler(self, name, data):
7872
"""Called when a chat message occurs in the game"""
@@ -99,12 +93,12 @@ def periodic_event_handler(self):
9993
self.clientinfo.position.yaw))
10094

10195
# Place a block in front of the player
102-
self.interact.place_block(self.clientinfo.position
103-
+ Vector3(-1, 0, -1))
96+
self.interact.place_block(
97+
self.clientinfo.position + Vector3(-1, 0, -1))
10498

10599
# Read a block under the player
106100
block_pos = self.clientinfo.position.floor()
107101
block_id, meta = self.world.get_block(*block_pos)
108102
block_at = blocks.get_block(block_id, meta)
109-
self.chat.chat('Found block %s at %s' % (block_at.display_name,
110-
block_pos))
103+
self.chat.chat('Found block %s at %s' % (
104+
block_at.display_name, block_pos))

0 commit comments

Comments
 (0)