Skip to content

Commit 01b1cac

Browse files
committed
Fix E402 Module level import not at top of file
1 parent dd282b7 commit 01b1cac

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

examples/sc2store.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

1212
from pprint import PrettyPrinter
1313

14-
pprint = PrettyPrinter(indent=2).pprint
15-
1614
from sqlalchemy import create_engine
1715
from sqlalchemy import Column, ForeignKey, distinct, Table
1816
from sqlalchemy import Integer, String, Sequence, DateTime
@@ -23,6 +21,8 @@
2321
from sqlalchemy.ext.declarative import declarative_base
2422
from sqlalchemy.ext.associationproxy import association_proxy
2523

24+
pprint = PrettyPrinter(indent=2).pprint
25+
2626
Base = declarative_base()
2727

2828
party_member = Table(

ruff.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
ignore = [
2-
"E402", # Module level import not at top of file
32
"F401", # module imported but unused; consider using `importlib.util.find_spec` to test for availability
43
"F403", # Run `removestar` on this codebase
54
"F405", # Run `removestar` on this codebase

sc2reader/constants.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import json
2+
import pkgutil
3+
14
# These are found in Repack-MPQ/fileset.{locale}#Mods#Core.SC2Mod#{locale}.SC2Data/LocalizedData/Editor/EditorCategoryStrings.txt
25
# EDSTR_CATEGORY_Race
36
# EDSTR_PLAYERPROPS_RACE
@@ -101,9 +104,6 @@
101104
}
102105

103106

104-
import json
105-
import pkgutil
106-
107107
attributes_json = pkgutil.get_data("sc2reader.data", "attributes.json").decode("utf8")
108108
attributes_dict = json.loads(attributes_json)
109109
LOBBY_PROPERTIES = dict()

0 commit comments

Comments
 (0)