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

CI/STYLE Fix misspellings exposed by codespell #39264

Merged
merged 7 commits into from
Jan 21, 2021
Merged
Show file tree
Hide file tree
Changes from 3 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 pandas/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ def git_pieces_from_vcs(tag_prefix, root, verbose, run_command=run_command):
# TAG-NUM-gHEX
mo = re.search(r"^(.+)-(\d+)-g([0-9a-f]+)$", git_describe)
if not mo:
# unparseable. Maybe git-describe is misbehaving?
# unparsable. Maybe git-describe is misbehaving?
pieces["error"] = "unable to parse git-describe output: '%s'" % describe_out
return pieces

Expand Down
2 changes: 1 addition & 1 deletion pandas/io/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def _get_filepath_or_buffer(
# urlopen function defined elsewhere in this module
import urllib.request

# assuming storage_options is to be interpretted as headers
# assuming storage_options is to be interpreted as headers
req_info = urllib.request.Request(filepath_or_buffer, headers=storage_options)
with urlopen(req_info) as req:
content_encoding = req.headers.get("Content-Encoding", None)
Expand Down
2 changes: 1 addition & 1 deletion pandas/io/excel/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
* dict, e.g. {'foo' : [1, 3]} -> parse columns 1, 3 as date and call
result 'foo'

If a column or index contains an unparseable date, the entire column or
If a column or index contains an unparsable date, the entire column or
index will be returned unaltered as an object data type. If you don`t want to
parse some cells as date just change their type in Excel to "Text".
For non-standard datetime parsing, use ``pd.to_datetime`` after ``pd.read_excel``.
Expand Down
2 changes: 1 addition & 1 deletion pandas/io/formats/format.py
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ class DataFrameRenderer:
Parameters
----------
fmt : DataFrameFormatter
Formatter with the formating options.
Formatter with the formatting options.
"""

def __init__(self, fmt: DataFrameFormatter):
Expand Down
2 changes: 1 addition & 1 deletion pandas/io/formats/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ def _gen_columns(self) -> Iterator[str]:

def _get_dataframe_dtype_counts(df: DataFrame) -> Mapping[str, int]:
"""
Create mapping between datatypes and their number of occurences.
Create mapping between datatypes and their number of occurrences.
"""
# groupby dtype.name to collect e.g. Categorical columns
return df.dtypes.value_counts().groupby(lambda x: x.name).sum()
2 changes: 1 addition & 1 deletion pandas/io/formats/style.py
Original file line number Diff line number Diff line change
Expand Up @@ -1697,7 +1697,7 @@ def from_custom_template(cls, searchpath, name):
"""
loader = jinja2.ChoiceLoader([jinja2.FileSystemLoader(searchpath), cls.loader])

# mypy doesnt like dynamically-defined class
# mypy doesn't like dynamically-defined classes
# error: Variable "cls" is not valid as a type [valid-type]
# error: Invalid base class "cls" [misc]
class MyStyler(cls): # type:ignore[valid-type,misc]
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ filterwarnings =
junit_family=xunit2

[codespell]
ignore-words-list=ba,blocs,coo,hist,nd,ser
ignore-words-list=ba,blocs,coo,hist,nd,ser,mose,fo,ist
Copy link
Member

Choose a reason for hiding this comment

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

where are mose, fo, and ist used? It might be possible to change the examples rather than ignoring them

Copy link
Contributor Author

Choose a reason for hiding this comment

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

mose is a proper noun used in the _json_normalize example here. It could be changed to a more traditional name to avoid this.

fo is used as a variable name here. I do not think we need to change this.

ist is used as part of a valid URL here. It should not be changed.

Copy link
Member

Choose a reason for hiding this comment

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

Thanks @zitorelova

Could you change mose to another name, and fo to fd?

I'll get back to you on the URL

Copy link
Contributor Author

@zitorelova zitorelova Jan 19, 2021

Choose a reason for hiding this comment

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

I've made changes based on your comments. There was another instance of fo used here. I've changed some of the list entries to resolve this.


[coverage:run]
branch = False
Expand Down