quantumlib / Qualtran

Qᴜᴀʟᴛʀᴀɴ is a Python library for expressing and analyzing Fault Tolerant Quantum algorithms.
https://qualtran.readthedocs.io/en/latest/
Apache License 2.0
134 stars 35 forks source link

Don't run pylint on deleted files. #1009

Closed fdmalone closed 1 month ago

fdmalone commented 1 month ago

I noticed in #1008 that ./check/pylint-changed-files would choke because I deleted some files. This PR adds a flag to filter out deleted files.

mpharrigan commented 1 month ago

@pavoljuhas is this bug fixed in the cirq version of this script? can we make sure the two scripts don't diverge too much

fdmalone commented 1 month ago

LGTM. Please also fix missing quotes reported by shellcheck

$ shellcheck -f gcc check/pylint-changed-files 
check/pylint-changed-files:49:24: note: Double quote to prevent globbing and word splitting. [SC2086]
check/pylint-changed-files:50:23: note: Double quote to prevent globbing and word splitting. [SC2086]

Done. Also just learned shellcheck existed!

pavoljuhas commented 1 month ago

@pavoljuhas is this bug fixed in the cirq version of this script? can we make sure the two scripts don't diverge too much

Not yet. This can wait after the cirq release. (https://github.com/quantumlib/Cirq/issues/6619)