Can't push changes -- quality code errors (not on my codes)

35 views
Skip to first unread message

Oldřich Klimánek

unread,
Sep 11, 2025, 4:07:33 PM (4 days ago) Sep 11
to sympy
Hi, I am trying to push changes to a new branch -- however, it fails on quality check. I did run quality check locally and everything was fine. And what is more, the errors in question have no relation to my codes I committed, see below (should I rebase before pushing?) And since when has Sympy started using ruff? 

ruff check sympy
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.13.7/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.13.7/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.7/x64
Python2_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.7/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.13.7/x64
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.13.7/x64/lib
FURB116 Replace `bin` call with `f'{rv:b}'`
--> sympy/combinatorics/graycode.py:285:18
|
283 | rv = self._current or '0'
284 | if not isinstance(rv, str):
285 | rv = bin(rv)[2:]
| ^^^^^^^^^^^
286 | return rv.rjust(self.n, '0')
|
help: Replace with `f'{rv:b}'`
FURB116 Replace `bin` call with `f'{n:b}'`
--> sympy/combinatorics/subsets.py:99:16
|
97 | bin_list = Subset.bitlist_from_subset(self.subset, self.superset)
98 | n = (int(''.join(bin_list), 2) + k) % 2**self.superset_size
99 | bits = bin(n)[2:].rjust(self.superset_size, '0')
| ^^^^^^^^^^
100 | return Subset.subset_from_bitlist(self.superset, bits)
|
help: Replace with `f'{n:b}'`
FURB116 Replace `bin` call with `f'{rank:b}'`
--> sympy/combinatorics/subsets.py:541:16
|
539 | iterate_binary, rank_binary
540 | """
541 | bits = bin(rank)[2:].rjust(len(superset), '0')
| ^^^^^^^^^^^^^
542 | return Subset.subset_from_bitlist(superset, bits)
|
help: Replace with `f'{rank:b}'`
FURB116 Replace `hex` call with `f'{man:x}'`
--> sympy/core/numbers.py:937:22
|
935 | def __getnewargs_ex__(self):
936 | sign, man, exp, bc = self._mpf_
937 | arg = (sign, hex(man)[2:], exp, bc)
| ^^^^^^^^^^^^
938 | kwargs = {'precision': self._prec}
939 | return ((arg,), kwargs)
|
help: Replace with `f'{man:x}'`
FURB116 Replace `bin` call with `f'{e:b}'`
--> sympy/polys/polyutils.py:559:46
|
557 | return NotImplemented
558 | else:
559 | bits = [int(d) for d in reversed(bin(e)[2:])]
| ^^^^^^^^^^
560 | n = len(bits)
561 | p = self
|
help: Replace with `f'{e:b}'`
FURB116 Replace `bin` call with `f'{n:b}'`
--> sympy/utilities/iterables.py:380:51
|
378 | if not str:
379 | if bits >= 0:
380 | return [1 if i == "1" else 0 for i in bin(n)[2:].rjust(bits, "0")]
| ^^^^^^^^^^
381 | else:
382 | return variations(range(2), n, repetition=True)
|
help: Replace with `f'{n:b}'`
FURB116 Replace `bin` call with `f'{n:b}'`
--> sympy/utilities/iterables.py:385:20
|
383 | else:
384 | if bits >= 0:
385 | return bin(n)[2:].rjust(bits, "0")
| ^^^^^^^^^^
386 | else:
387 | return (bin(i)[2:].rjust(n, "0") for i in range(2**n))
|
help: Replace with `f'{n:b}'`
FURB116 Replace `bin` call with `f'{i:b}'`
--> sympy/utilities/iterables.py:387:21
|
385 | return bin(n)[2:].rjust(bits, "0")
386 | else:
387 | return (bin(i)[2:].rjust(n, "0") for i in range(2**n))
| ^^^^^^^^^^
|
help: Replace with `f'{i:b}'`
Found 8 errors.
Error: Process completed with exit code 1.

Oscar Benjamin

unread,
Sep 12, 2025, 6:57:49 AM (3 days ago) Sep 12
to sy...@googlegroups.com
This was fixed yesterday:
https://github.com/sympy/sympy/pull/28394

You should pull the latest updates from master.

On Thu, 11 Sept 2025 at 21:07, Oldřich Klimánek
> --
> You received this message because you are subscribed to the Google Groups "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to sympy+un...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/sympy/12eebf5d-89b5-4ba1-863c-0f5ef300447fn%40googlegroups.com.

Oldřich Klimánek

unread,
Sep 12, 2025, 10:00:19 AM (3 days ago) Sep 12
to sympy
I was pulling from master. OK, it works now after "git rebase upstream/master". Maybe the dev guide should be more thorough for newcomers. 

Dne pátek 12. září 2025 v 12:57:49 UTC+2 uživatel Oscar napsal:

Aasim

unread,
Sep 12, 2025, 10:07:01 AM (3 days ago) Sep 12
to sy...@googlegroups.com
Yes, it might be worth adding the Ruff check here,
besides the "./bin/test quality" and "flake8 sympy" checks.

Reply all
Reply to author
Forward
0 new messages