Clean up imports and terminal newlines in files according to pylint
This commit is contained in:
parent
372cd5f295
commit
d0a2e2c2ef
4 changed files with 15 additions and 9 deletions
|
@ -1,10 +1,12 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# Eryn Wells <eryn@erynwells.me>
|
# Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
import tcod
|
import tcod
|
||||||
|
|
||||||
from .actions import Action, ExitAction, RegenerateRoomsAction, BumpAction
|
from .actions import Action, ExitAction, RegenerateRoomsAction, BumpAction
|
||||||
from .geometry import Direction
|
from .geometry import Direction
|
||||||
from typing import Optional
|
|
||||||
|
|
||||||
class EventHandler(tcod.event.EventDispatch[Action]):
|
class EventHandler(tcod.event.EventDispatch[Action]):
|
||||||
def ev_quit(self, event: tcod.event.Quit) -> Optional[Action]:
|
def ev_quit(self, event: tcod.event.Quit) -> Optional[Action]:
|
||||||
|
|
|
@ -124,4 +124,4 @@ class Rect:
|
||||||
yield tuple(self.size)
|
yield tuple(self.size)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return f'[{self.origin}, {self.size}]'
|
return f'[{self.origin}, {self.size}]'
|
||||||
|
|
|
@ -2,14 +2,16 @@
|
||||||
# Eryn Wells <eryn@erynwells.me>
|
# Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import numpy as np
|
|
||||||
import random
|
import random
|
||||||
import tcod
|
|
||||||
from .geometry import Direction, Point, Rect, Size
|
|
||||||
from .tile import Empty, Floor, Shroud, Wall
|
|
||||||
from dataclasses import dataclass
|
from dataclasses import dataclass
|
||||||
from typing import Iterator, List, Optional
|
from typing import Iterator, List, Optional
|
||||||
|
|
||||||
|
import numpy as np
|
||||||
|
import tcod
|
||||||
|
|
||||||
|
from .geometry import Direction, Point, Rect, Size
|
||||||
|
from .tile import Empty, Floor, Shroud, Wall
|
||||||
|
|
||||||
LOG = logging.getLogger('map')
|
LOG = logging.getLogger('map')
|
||||||
|
|
||||||
class Map:
|
class Map:
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# Eryn Wells <eryn@erynwells.me>
|
# Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
import tcod
|
|
||||||
from .geometry import Point
|
|
||||||
from typing import Optional, Tuple
|
from typing import Optional, Tuple
|
||||||
|
|
||||||
|
import tcod
|
||||||
|
|
||||||
|
from .geometry import Point
|
||||||
|
|
||||||
class Entity:
|
class Entity:
|
||||||
'''A single-tile drawable entity with a symbol and position.'''
|
'''A single-tile drawable entity with a symbol and position.'''
|
||||||
|
|
||||||
|
@ -28,4 +30,4 @@ class Entity:
|
||||||
|
|
||||||
class Hero(Entity):
|
class Hero(Entity):
|
||||||
def __init__(self, position: Point):
|
def __init__(self, position: Point):
|
||||||
super().__init__('@', position=position, fg=tuple(tcod.white))
|
super().__init__('@', position=position, fg=tuple(tcod.white))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue