Skip to content

Commit

Permalink
Remove redundant spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
dachengx committed Aug 25, 2024
1 parent 98dfa25 commit 5a73a25
Show file tree
Hide file tree
Showing 10 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pypi_install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ jobs:
# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
with:
user: ${{ secrets.pipy_token }}
user: ${{ secrets.pipy_token }}
password: ${{ secrets.pypi_password }}
6 changes: 3 additions & 3 deletions strax/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ def register(self, plugin_class):
"Two plugins have a different default value"
" for the same option. The option"
f' "{new_option}" in "{plugin.__name__}" takes'
f' as a default "{default}" while in'
f' as a default "{default}" while in'
f' "{plugin_class.__name__}" the default value'
f' is set to "{new_default}". Please change'
" one of the defaults."
Expand Down Expand Up @@ -1954,7 +1954,7 @@ def get_zarr(
overwrite=True,
**kwargs,
):
"""Get persistent arrays using zarr. This is useful when loading large amounts of data that
"""Get persistent arrays using zarr. This is useful when loading large amounts of data that
cannot fit in memory zarr is very compatible with dask. Targets are loaded into separate
arrays and runs are merged. the data is added to any existing data in the storage location.
Expand Down Expand Up @@ -2051,7 +2051,7 @@ def compare_metadata(self, data1, data2, return_results=False):
are found for the inputs does not do the comparison
example usage:
context.compare_metadata( ("053877", "peak_basics"), "./my_path_to/JSONfile.json")
context.compare_metadata(("053877", "peak_basics"), "./my_path_to/JSONfile.json")
first_metadata = context.get_metadata(run_id, "events")
context.compare_metadata(
("053877", "peak_basics"), first_metadata)
Expand Down
4 changes: 2 additions & 2 deletions strax/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ def hitlet_dtype():
),
np.float32,
),
(("Left edge of the 50% highest density region [ns]", "left_hdr"), np.float32),
(("Left edge of the 80% highest density region [ns]", "low_left_hdr"), np.float32),
(("Left edge of the 50% highest density region [ns]", "left_hdr"), np.float32),
(("Left edge of the 80% highest density region [ns]", "low_left_hdr"), np.float32),
(("FWHM of the PMT pulse [ns]", "fwhm"), np.float32),
(('Left edge of the FWHM [ns] (minus "time")', "left"), np.float32),
(("FWTM of the PMT pulse [ns]", "fwtm"), np.float32),
Expand Down
2 changes: 1 addition & 1 deletion strax/mailbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def __init__(self, name="mailbox", timeout=None, lazy=False, max_messages=None):
# Do NOT call notify_all when the condition is False!
# We use wait_for, which also returns False when the timeout is broken
# (Is this an odd design decision in the standard library
# or am I misunderstanding something?)
# or am I misunderstanding something?)
class Condition:
"""Small helper class which wraps "threading.Condition" to get some useful logging
information for debugging."""
Expand Down
2 changes: 1 addition & 1 deletion strax/plugins/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ def _check_dtype(self, x, d=None):
raise strax.PluginGaveWrongOutput(
f"Plugin {pname} did not deliver "
f"data type {d} as promised.\n"
f"Promised: {expect}\n"
f"Promised: {expect}\n"
f"Delivered: {got}."
)

Expand Down
4 changes: 2 additions & 2 deletions strax/processing/hitlets.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,9 @@ def _get_hitlets_data(hitlets, records, to_pe):
)

if (r_end - r_start) == 0 and (h_end - h_start) == 0:
# _touching_windows will give a range of overlapping records with hitlet
# _touching_windows will give a range of overlapping records with hitlet
# independent of channel. Hence, in rare cases it might be that a record of
# channel A touches with a hitlet of channel B which starts before the previous
# channel A touches with a hitlet of channel B which starts before the previous
# record of channel b. Hence we get one non-overlapping record in channel b.
continue

Expand Down
2 changes: 1 addition & 1 deletion strax/processing/pulse_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def record_links(records):
next_record[last_i] = i

# (If neither matches, this is a continuing record, but the starting
# record has been cut away (e.g. for data reduction))
# record has been cut away (e.g. for data reduction))
last_record_seen[ch] = i
expected_next_start[ch] = r["time"] + samples_per_record * r["dt"]

Expand Down
4 changes: 2 additions & 2 deletions strax/processors/post_office.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class PostOffice:
_readers_done: ty.Dict[str, ty.List[str]]

# (Factoring the above variables into a Topic class didn't work for me.
# Multi-output producers exist, topic would be != topic_name, etc..)
# Multi-output producers exist, topic would be != topic_name, etc..)

def __init__(self):
self.time_spent = dict()
Expand Down Expand Up @@ -199,7 +199,7 @@ def _read(self, topic, reader):
except StopIteration:
# Message actually won't come, exit the while loop.
# (The while condition wasn't triggered because
# the producer only just realized the topic is exhausted)
# the producer only just realized the topic is exhausted)
break
log.debug(f"{reader} receiving message {result}, number {msg_number} of {topic}")
# Note receipt before yielding, so we can clear unnecessary
Expand Down
4 changes: 2 additions & 2 deletions strax/processors/threaded_mailbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@ def __init__(
self.process_executor = self.thread_executor # type: ignore

# Figure which outputs
# - we should exclude from the flow control in lazy mode,
# - we should exclude from the flow control in lazy mode,
# because they are produced but not required.
# - we should discard (produced but neither required not saved)
# - we should discard (produced but neither required not saved)
produced = set(components.loaders)
required = set(components.targets)
# Do not just take keys from savers, perhaps some keys
Expand Down
2 changes: 1 addition & 1 deletion strax/run_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ def select_runs(
for required tags
:param exclude_tags: String / list of strings of patterns
for forbidden tags.
Exclusion criteria have higher priority than inclusion criteria.
Exclusion criteria have higher priority than inclusion criteria.
:param pattern_type: Type of pattern matching to use.
Defaults to 'fnmatch', which means you can use
unix shell-style wildcards (`?`, `*`).
Expand Down

0 comments on commit 5a73a25

Please sign in to comment.