1
0
mirror of synced 2025-01-24 23:13:40 +01:00

Use explicit importing over relative importing

Helps when the package is used by a different script
This commit is contained in:
Viv 2023-06-02 16:35:05 -04:00
parent ae9cde3a20
commit d671939c41
5 changed files with 11 additions and 11 deletions

View File

@ -1,7 +1,7 @@
from copy import deepcopy from copy import deepcopy
from utils import computeSoulGaugeByte from tja2fumen.utils import computeSoulGaugeByte
from constants import TJA_NOTE_TYPES, DIFFICULTY_BYTES, unknownHeaderSample from tja2fumen.constants import TJA_NOTE_TYPES, DIFFICULTY_BYTES, unknownHeaderSample
# Filler metadata that the `writeFumen` function expects # Filler metadata that the `writeFumen` function expects
default_note = {'type': '', 'pos': 0.0, 'item': 0, 'padding': 0.0, default_note = {'type': '', 'pos': 0.0, 'item': 0, 'padding': 0.0,

View File

@ -1,7 +1,7 @@
from parsers import readFumen, parseTJA from tja2fumen.parsers import readFumen, parseTJA
from writers import writeFumen from tja2fumen.writers import writeFumen
from converters import convertTJAToFumen from tja2fumen.converters import convertTJAToFumen
from utils import checkMismatchedBytes from tja2fumen.utils import checkMismatchedBytes
tja2fumen_version = "v0.1" tja2fumen_version = "v0.1"

View File

@ -1,8 +1,8 @@
import os import os
import re import re
from utils import readStruct, getBool, shortHex, nameValue, debugPrint, checkValidHeader, validateHeaderMetadata from tja2fumen.utils import readStruct, getBool, shortHex, nameValue, debugPrint, checkValidHeader, validateHeaderMetadata
from constants import ( from tja2fumen.constants import (
# TJA constants # TJA constants
HEADER_GLOBAL, HEADER_COURSE, BRANCH_COMMANDS, MEASURE_COMMANDS, COMMAND, HEADER_GLOBAL, HEADER_COURSE, BRANCH_COMMANDS, MEASURE_COMMANDS, COMMAND,
# Fumen constants # Fumen constants

View File

@ -2,7 +2,7 @@ import sys
import struct import struct
import math import math
from constants import simpleHeaders, byte_strings from tja2fumen.constants import simpleHeaders, byte_strings
def checkValidHeader(header): def checkValidHeader(header):

View File

@ -1,5 +1,5 @@
from utils import writeStruct, putBool from tja2fumen.utils import writeStruct, putBool
from constants import simpleHeaders, branchNames, typeNotes from tja2fumen.constants import simpleHeaders, branchNames, typeNotes
def writeFumen(file, song): def writeFumen(file, song):