Skip to content

Commit 84d404f

Browse files
authored
Merge pull request #603 from boriel/build/dependencies
build: update project dependencies
2 parents ea85ad6 + 32defdf commit 84d404f

11 files changed

Lines changed: 127 additions & 228 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ repos:
66
- id: end-of-file-fixer
77
- id: trailing-whitespace
88
- repo: https://github.com/psf/black
9-
rev: 21.9b0
9+
rev: 22.1.0
1010
hooks:
1111
- id: black

poetry.lock

Lines changed: 102 additions & 199 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,11 @@ python = "^3.8"
4646
[tool.poetry.dev-dependencies]
4747
tox = "^3.15.1"
4848
flake8 = "^3.8.2"
49-
pytest = "^5.4.2"
49+
pytest = "^6.2.5"
5050
pytest-timeout = "^1.3.4"
5151
bump2version = "^1.0.0"
5252
pre-commit = "^2.15.0"
53-
black = "^21.9b0"
53+
black = "^22.1.0"
5454
mkdocs = "^1.2.2"
5555

5656
[build-system]

src/arch/z80/backend/_f16.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def f16(op):
3535
op = -op
3636

3737
DE = int(op)
38-
HL = int((op - DE) * 2 ** 16) & 0xFFFF
38+
HL = int((op - DE) * 2**16) & 0xFFFF
3939
DE &= 0xFFFF
4040

4141
if negative: # Do C2

src/arch/z80/beep.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def getDEHL(duration, pitch):
5454

5555
frec = TABLE[A]
5656
tmp2 = tmp * frec
57-
f = tmp2 * 2.0 ** B
57+
f = tmp2 * 2.0**B
5858

5959
DE = int(0.5 + f * duration - 1)
6060
HL = int(0.5 + 437500.0 / f - 30.125)

src/arch/z80/translator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ def default_value(cls, type_, expr): # TODO: This function must be moved to api
10381038
return [C, DE[-2:], DE[:-2], HL[-2:], HL[:-2]]
10391039

10401040
if type_ == cls.TYPE(TYPE.fixed):
1041-
value = 0xFFFFFFFF & int(expr.value * 2 ** 16)
1041+
value = 0xFFFFFFFF & int(expr.value * 2**16)
10421042
else:
10431043
value = int(expr.value)
10441044

src/arch/z80/translatorvisitor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ def emit_data_blocks(self):
142142
lbl = self.add_string_label(d.value.value)
143143
self.ic_data(gl.PTR_TYPE, [lbl])
144144
elif d.value.type_ == self.TYPE(TYPE.fixed): # Convert to bytes
145-
bytes_ = 0xFFFFFFFF & int(d.value.value * 2 ** 16)
145+
bytes_ = 0xFFFFFFFF & int(d.value.value * 2**16)
146146
self.ic_data(TYPE.uinteger, ["0x%04X" % (bytes_ & 0xFFFF), "0x%04X" % (bytes_ >> 16)])
147147
else:
148148
self.ic_data(d.value.type_, [self.traverse_const(d.value)])

src/arch/zx48k/beep.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def getDEHL(duration, pitch):
5454

5555
frec = TABLE[A]
5656
tmp2 = tmp * frec
57-
f = tmp2 * 2.0 ** B
57+
f = tmp2 * 2.0**B
5858

5959
DE = int(0.5 + f * duration - 1)
6060
HL = int(0.5 + 437500.0 / f - 30.125)

src/symbols/binary.py

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -96,25 +96,21 @@ def make_node(cls, operator, left, right, lineno, func=None, type_=None):
9696
b = SymbolTYPECAST.make_node(c_type, b, lineno) # ensure type
9797
return SymbolCONST(cls(operator, a, b, lineno, type_=type_, func=func), lineno=lineno)
9898

99-
if (
100-
operator
101-
in {
102-
"BNOT",
103-
"BAND",
104-
"BOR",
105-
"BXOR",
106-
"NOT",
107-
"AND",
108-
"OR",
109-
"XOR",
110-
"MINUS",
111-
"MULT",
112-
"DIV",
113-
"SHL",
114-
"SHR",
115-
}
116-
and not check.is_numeric(a, b)
117-
):
99+
if operator in {
100+
"BNOT",
101+
"BAND",
102+
"BOR",
103+
"BXOR",
104+
"NOT",
105+
"AND",
106+
"OR",
107+
"XOR",
108+
"MINUS",
109+
"MULT",
110+
"DIV",
111+
"SHL",
112+
"SHR",
113+
} and not check.is_numeric(a, b):
118114
errmsg.error(lineno, "Operator %s cannot be used with STRINGS" % operator)
119115
return None
120116

src/zxbasm/expr.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Expr(Ast):
1515
"+": lambda x, y: x + y,
1616
"*": lambda x, y: x * y,
1717
"/": lambda x, y: x // y,
18-
"^": lambda x, y: x ** y,
18+
"^": lambda x, y: x**y,
1919
"%": lambda x, y: x % y,
2020
"&": lambda x, y: x & y,
2121
"|": lambda x, y: x | y,

0 commit comments

Comments
 (0)