diff --git a/pyproject.toml b/pyproject.toml index d03872bcd..fe96fe758 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -120,7 +120,6 @@ ignore = [ "E731", "E741", "PLR0124", - "PLR0402", "PLR0911", "PLR0912", "PLR0913", diff --git a/src/arch/z80/visitor/translator.py b/src/arch/z80/visitor/translator.py index 5f28e32eb..c2e0ff508 100644 --- a/src/arch/z80/visitor/translator.py +++ b/src/arch/z80/visitor/translator.py @@ -2,10 +2,10 @@ from collections import namedtuple -import src.api.check as check import src.api.errmsg import src.api.global_ as gl import src.api.tmp_labels +from src.api import check from src.api.config import OPTIONS from src.api.constants import CLASS, CONVENTION, SCOPE, TYPE from src.api.debug import __DEBUG__ diff --git a/src/symbols/arrayaccess.py b/src/symbols/arrayaccess.py index 9be83fc62..af83d2ce1 100644 --- a/src/symbols/arrayaccess.py +++ b/src/symbols/arrayaccess.py @@ -10,9 +10,8 @@ from typing import Optional -import src.api.check as check -import src.api.errmsg as errmsg import src.api.global_ as gl +from src.api import check, errmsg from src.api.constants import SCOPE from src.symbols.arglist import SymbolARGLIST from src.symbols.binary import SymbolBINARY as BINARY diff --git a/src/symbols/binary.py b/src/symbols/binary.py index cf1759105..919790b54 100644 --- a/src/symbols/binary.py +++ b/src/symbols/binary.py @@ -8,8 +8,7 @@ # the GNU General License # ---------------------------------------------------------------------- -import src.api.check as check -import src.api.errmsg as errmsg +from src.api import check, errmsg from src.symbols.constexpr import SymbolCONSTEXPR from src.symbols.number import SymbolNUMBER from src.symbols.string_ import SymbolSTRING diff --git a/src/symbols/block.py b/src/symbols/block.py index 0aa577ee1..e80a581f2 100644 --- a/src/symbols/block.py +++ b/src/symbols/block.py @@ -8,7 +8,7 @@ # the GNU General License v3 # ---------------------------------------------------------------------- -import src.api.check as check +from src.api import check from .symbol_ import Symbol diff --git a/src/symbols/builtin.py b/src/symbols/builtin.py index fd41842e2..986173b0e 100644 --- a/src/symbols/builtin.py +++ b/src/symbols/builtin.py @@ -7,7 +7,7 @@ # the GNU General License # ---------------------------------------------------------------------- -import src.api.check as check +from src.api import check from .number import SymbolNUMBER from .symbol_ import Symbol diff --git a/src/symbols/call.py b/src/symbols/call.py index f7887ddb2..920dbfddd 100644 --- a/src/symbols/call.py +++ b/src/symbols/call.py @@ -11,9 +11,8 @@ from collections.abc import Iterable from typing import Optional -import src.api.check as check -import src.api.errmsg as errmsg import src.api.global_ as gl +from src.api import check, errmsg from src.api.constants import CLASS from src.symbols.arglist import SymbolARGLIST from src.symbols.argument import SymbolARGUMENT diff --git a/src/symbols/strslice.py b/src/symbols/strslice.py index 2cb1aa3f4..4903da3cd 100644 --- a/src/symbols/strslice.py +++ b/src/symbols/strslice.py @@ -8,9 +8,8 @@ # the GNU General License # ---------------------------------------------------------------------- -import src.api.check as check -import src.api.config as config import src.api.global_ as gl +from src.api import check, config from src.symbols.binary import SymbolBINARY as BINARY from src.symbols.number import SymbolNUMBER as NUMBER from src.symbols.string_ import SymbolSTRING as STRING diff --git a/src/symbols/unary.py b/src/symbols/unary.py index 4887c19d4..4cedd29c3 100644 --- a/src/symbols/unary.py +++ b/src/symbols/unary.py @@ -8,7 +8,7 @@ # the GNU General License # ---------------------------------------------------------------------- -import src.api.check as check +from src.api import check from src.symbols.number import SymbolNUMBER from src.symbols.string_ import SymbolSTRING from src.symbols.symbol_ import Symbol diff --git a/src/zxbasm/asmparse.py b/src/zxbasm/asmparse.py index 3c4e9b92e..e1f8518b8 100755 --- a/src/zxbasm/asmparse.py +++ b/src/zxbasm/asmparse.py @@ -13,12 +13,12 @@ import os import src.api.utils -import src.ply.yacc as yacc from src import outfmt from src.api import global_ as gl from src.api.config import OPTIONS from src.api.debug import __DEBUG__ from src.api.errmsg import error, warning +from src.ply import yacc from src.zxbasm import asmlex, basic from src.zxbasm import global_ as asm_gl from src.zxbasm.asm import Asm, Container diff --git a/src/zxbpp/prepro/builtinmacro.py b/src/zxbpp/prepro/builtinmacro.py index 52bbf668e..077de2c0d 100644 --- a/src/zxbpp/prepro/builtinmacro.py +++ b/src/zxbpp/prepro/builtinmacro.py @@ -1,4 +1,4 @@ -import src.zxbpp.prepro as prepro +from src.zxbpp import prepro from .id_ import ID from .macrocall import MacroCall diff --git a/src/zxbpp/prepro/id_.py b/src/zxbpp/prepro/id_.py index ebadf6fe4..cee343c68 100644 --- a/src/zxbpp/prepro/id_.py +++ b/src/zxbpp/prepro/id_.py @@ -8,8 +8,8 @@ import copy import sys -import src.zxbpp.prepro as prepro from src.api.debug import __DEBUG__ +from src.zxbpp import prepro from .macrocall import MacroCall from .output import CURRENT_FILE diff --git a/src/zxbpp/prepro/macrocall.py b/src/zxbpp/prepro/macrocall.py index b5d4aeb6a..96853b8ee 100644 --- a/src/zxbpp/prepro/macrocall.py +++ b/src/zxbpp/prepro/macrocall.py @@ -5,8 +5,8 @@ import re from typing import Union -import src.zxbpp.prepro as prepro from src.api.debug import __DEBUG__ +from src.zxbpp import prepro from .exceptions import PreprocError diff --git a/tests/symbols/test_symbolARRAYACCESS.py b/tests/symbols/test_symbolARRAYACCESS.py index 87fd1d71f..ed37df8a2 100644 --- a/tests/symbols/test_symbolARRAYACCESS.py +++ b/tests/symbols/test_symbolARRAYACCESS.py @@ -3,8 +3,8 @@ from io import StringIO from unittest import TestCase -import src.api.config as config import src.api.global_ as gl +from src.api import config from src.api.symboltable.symboltable import SymbolTable from src.symbols import sym from src.symbols.type_ import Type