Skip to content

Commit 78d3000

Browse files
committed
Move over to module layout and fix GH lint
1 parent dff83c0 commit 78d3000

5 files changed

Lines changed: 11 additions & 9 deletions

File tree

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ jobs:
3434
pip install -r requirements.txt
3535
3636
- name: Run Linter
37-
run: pylint src/*
37+
run: pylint src

main.py renamed to src/__init__.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@
44
import discord
55
from discord.ext import commands
66

7-
with open(".env", "r", encoding="utf-8") as env:
8-
conf = {k: v for line in env
9-
if (k := line.strip().split("=", 1)[0]) and \
10-
(v := line.strip().split("=", 1)[1])}
11-
127

138
class SideBot(commands.Bot):
149
"Custom SideBot class to simplify start up"
@@ -42,6 +37,3 @@ async def on_command_error(self, ctx, error):
4237
"Handle unhandled command errors"
4338
print(ctx)
4439
print(error)
45-
46-
47-
SideBot().run(conf['DTOKEN'])

src/__main__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# pylint: disable=C0114
2+
from . import SideBot
3+
4+
with open(".env", "r", encoding="utf-8") as env:
5+
conf = {k: v for line in env
6+
if (k := line.strip().split("=", 1)[0]) and \
7+
(v := line.strip().split("=", 1)[1])}
8+
9+
10+
SideBot().run(conf['DTOKEN'])
File renamed without changes.

0 commit comments

Comments
 (0)