Skip to content

Commit

Permalink
Ensure that we don't check in code with print statements. (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
jpivarski authored Sep 18, 2020
1 parent 1a7b453 commit b3b3e7f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
5 changes: 3 additions & 2 deletions docs-sphinx/prepare_docstrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import inspect
import pkgutil
import os.path
import sys


order = [
Expand Down Expand Up @@ -41,9 +42,9 @@ def ensure(objname, filename, content):
overwrite = open(filename, "r").read() != content
if overwrite:
open(filename, "w").write(content)
print(objname, "(OVERWRITTEN)")
sys.err.write(objname + " (OVERWRITTEN)\n")
else:
print(objname)
sys.err.write(objname + "\n")


def handle_module(modulename, module):
Expand Down
1 change: 1 addition & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pytest
flake8
flake8-print
scikit-hep-testdata
lz4
xxhash
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[flake8]
ignore = E203, W503, E501, E266
ignore = E203, W503, E501, E266, N
max-complexity = 100
exclude = tests, setup.py, uproot4/__init__.py

Expand Down
1 change: 0 additions & 1 deletion uproot4/reading.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ def open(
* :py:func:`~uproot4.behaviors.TBranch.lazy`: returns a lazily read array from
``TTrees``.
"""

if isinstance(path, dict) and len(path) == 1:
((file_path, object_path),) = path.items()

Expand Down
4 changes: 2 additions & 2 deletions uproot4/source/futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def run(self):
"""
future = None
while True:
del future # don't hang onto a reference while waiting for more work
del future # don't hang onto a reference while waiting for more work
future = self._work_queue.get()
if future is None:
break
Expand Down Expand Up @@ -323,7 +323,7 @@ def run(self):
"""
future = None
while True:
del future # don't hang onto a reference while waiting for more work
del future # don't hang onto a reference while waiting for more work
future = self._work_queue.get()
if future is None:
break
Expand Down

0 comments on commit b3b3e7f

Please sign in to comment.