diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c6cccb6c..060016b0c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -67,7 +67,7 @@ repos: - id: no-commit-to-branch name: 'The commit is not being made to the main branch' - args: [--branch, main, --branch, master] + args: [--branch, main] - id: check-merge-conflict name: "Files are free of git merge conflict strings" diff --git a/.pylintrc b/.pylintrc index 1aba3674d..d3e4bd87a 100644 --- a/.pylintrc +++ b/.pylintrc @@ -998,7 +998,7 @@ callbacks=cb_, # A regular expression matching the name of placeholder variables (i.e. expected to # not be used). -dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ +dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|^ignored_|^unused_|^placeholder_? # Argument names that match this expression will be ignored. ignored-argument-names=_.*|^ignored_|^unused_ diff --git a/conftest.py b/conftest.py index 080bcba9d..b14b0ef05 100644 --- a/conftest.py +++ b/conftest.py @@ -61,7 +61,7 @@ def set_threadpool_limits(): if "PYTEST_XDIST_WORKER_COUNT" in os.environ: from openfermion.config import get_available_cpu_count - # Limit native library thread pools for this worker. + # Limit compiled library thread pools for this worker. with threadpoolctl.threadpool_limits(limits=get_available_cpu_count()): yield else: diff --git a/src/openfermion/ops/operators/binary_code.py b/src/openfermion/ops/operators/binary_code.py index 14eb48764..bd099f05b 100644 --- a/src/openfermion/ops/operators/binary_code.py +++ b/src/openfermion/ops/operators/binary_code.py @@ -300,10 +300,10 @@ def __rmul__(self, factor): def __str__(self): """Return an easy-to-read string representation.""" - def convert_to_native(value): + def to_python_type(value): return getattr(value, "tolist", lambda: value)() - string_return = [list(map(list, convert_to_native(self.encoder.toarray())))] + string_return = [list(map(list, to_python_type(self.encoder.toarray())))] dec_str = '[' for term in self.decoder: