Skip to content

Commit

Permalink
Merge pull request #855 from bartsanchez/bart/fix-ruff-rule-PLR0402
Browse files Browse the repository at this point in the history
fix: Ruff rule PLR0402 (manual-from-import)
  • Loading branch information
boriel authored Nov 6, 2024
2 parents de6f41f + f43ccad commit 1c61a23
Show file tree
Hide file tree
Showing 14 changed files with 13 additions and 18 deletions.
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ ignore = [
"E731",
"E741",
"PLR0124",
"PLR0402",
"PLR0911",
"PLR0912",
"PLR0913",
Expand Down
2 changes: 1 addition & 1 deletion src/arch/z80/visitor/translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand Down
3 changes: 1 addition & 2 deletions src/symbols/arrayaccess.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/symbols/binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/symbols/block.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
# the GNU General License v3
# ----------------------------------------------------------------------

import src.api.check as check
from src.api import check

from .symbol_ import Symbol

Expand Down
2 changes: 1 addition & 1 deletion src/symbols/builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/symbols/call.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/symbols/strslice.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/symbols/unary.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/zxbasm/asmparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/zxbpp/prepro/builtinmacro.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import src.zxbpp.prepro as prepro
from src.zxbpp import prepro

from .id_ import ID
from .macrocall import MacroCall
Expand Down
2 changes: 1 addition & 1 deletion src/zxbpp/prepro/id_.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/zxbpp/prepro/macrocall.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion tests/symbols/test_symbolARRAYACCESS.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1c61a23

Please sign in to comment.