Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix typo #1227

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rapidjson
Submodule rapidjson updated 150 files
2 changes: 1 addition & 1 deletion src/awkward/_v2/contents/bitmaskedarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def mergeable(self, other, mergebool):
if isinstance(
other,
(
ak._v2.contents.emptyArray.EmptyArray,
ak._v2.contents.emptyarray.EmptyArray,
Copy link
Contributor Author

@martindurant martindurant Jan 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or should it just be ak._v2.contents.EmptyArray ? Contents module already imports all the things. In this module, there are a number of these, but the others follow the lower-case spelling.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There shouldn't be any lower camelCase module names at all.

Using

egrep -r '\b[a-z]+[A-Z]' src/awkward/_v2/**/*.py | egrep -v '\bto' | egrep -v '\bkMax' | egrep -v '\bkSlice'

I found the one you just found and another one in indexedarray.py (in addition to the original), though that's it; the rest of the regex matches are not instances of this copy-paste error.

src/awkward/_v2/_connect/numexpr.py:# def getArguments(names, local_dict=None, global_dict=None):
src/awkward/_v2/_connect/numexpr.py:#     context = numexpr.necompiler.getContext(kwargs, frame_depth=1)
src/awkward/_v2/_connect/numexpr.py:#         numexpr.necompiler._names_cache[expr_key] = numexpr.necompiler.getExprNames(
src/awkward/_v2/_connect/numexpr.py:#     arguments = getArguments(names, local_dict, global_dict)
src/awkward/_v2/_connect/numexpr.py:#     arguments = getArguments(names, local_dict)
src/awkward/_v2/_connect/numpy.py:#         rowsA = len(A)
src/awkward/_v2/_connect/numpy.py:#         colsA = first
src/awkward/_v2/_connect/numpy.py:#         rowsB = len(B)
src/awkward/_v2/_connect/numpy.py:#         colsB = first
src/awkward/_v2/_connect/numpy.py:#         if colsA != rowsB:
src/awkward/_v2/contents/bitmaskedarray.py:                ak._v2.contents.emptyArray.EmptyArray,
src/awkward/_v2/contents/indexedarray.py:                ak._v2.contents.emptyArray.EmptyArray,
src/awkward/_v2/contents/listarray.py:            next_content = asListOffsetArray64._content
src/awkward/_v2/highlevel.py:_dir_pattern = re.compile(r"^[a-zA-Z_]\w*$")
src/awkward/_v2/operations/convert/ak_from_json_schema.py:        "`\\uXXXX`" escape sequences. If an `"enum"` is given, strings are represented
src/awkward/_v2/operations/convert/ak_from_json_schema.py:        if schema.get("minItems") == schema.get("maxItems") != None:  # noqa: E711
src/awkward/_v2/operations/convert/ak_from_json_schema.py:            assert ak._v2._util.isint(schema.get("minItems"))
src/awkward/_v2/operations/convert/ak_from_json_schema.py:            instructions.append(["FixedLengthList", schema.get("minItems")])
src/awkward/_v2/operations/convert/ak_from_json_schema.py:            out = ak._v2.forms.RegularForm(content, size=schema.get("minItems"))
src/awkward/_v2/operations/convert/ak_to_buffers.py:    Dask, but partition numbers can be emulated by prepending a fixed `"partN-"`

As for whether it should be ak._v2.contents.emptyarray.EmptyArray or ak._v2.contents.EmptyArray, I slightly prefer the latter, though I'd make it fit the context of the surrounding code, if relevant.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, in that case my version is fine, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your version is fine, though there's another one just like this in indexedarray.py:

src/awkward/_v2/contents/indexedarray.py:                ak._v2.contents.emptyArray.EmptyArray,

Since you reported the first one in unmaskedarray.py, I figure it's only a matter of time before you hit the one in indexedarray.py, too.

Meanwhile, I'm more worried about the build failing. You made a change that can't affect compilation, and yet every compilation is failing (in pybind11, which was recently updated...).

ak._v2.contents.unionarray.UnionArray,
),
):
Expand Down
2 changes: 1 addition & 1 deletion src/awkward/_v2/contents/indexedarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@ def mergeable(self, other, mergebool):
if isinstance(
other,
(
ak._v2.contents.emptyArray.EmptyArray,
ak._v2.contents.emptyarray.EmptyArray,
ak._v2.contents.unionarray.UnionArray,
),
):
Expand Down