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 typos and grammar errors in docstrings and comments #1366

Merged
merged 8 commits into from Nov 20, 2022

Conversation

qianyun210603
Copy link
Contributor

Description

Fix some types and missing's in doc strings.

Motivation and Context

improve code quality

How Has This Been Tested?

  • Pass the test by running: pytest qlib/tests/test_all_pipeline.py under upper directory of qlib.
  • If you are adding a new feature, test on your own test scripts.

Screenshots of Test Results (if appropriate):

  1. Pipeline test:
  2. Your own tests:

Types of changes

  • Fix bugs
  • Add new feature
  • Update documentation

Copy link
Collaborator

@ChiahungTai ChiahungTai left a comment

Choose a reason for hiding this comment

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

@qianyun210603
Thanks to your effort.
@you-n-g
LGTM

qlib/backtest/exchange.py Outdated Show resolved Hide resolved
qlib/backtest/exchange.py Outdated Show resolved Hide resolved
qlib/contrib/model/pytorch_adarnn.py Outdated Show resolved Hide resolved
qlib/contrib/model/pytorch_add.py Outdated Show resolved Hide resolved
qlib/contrib/model/pytorch_alstm.py Outdated Show resolved Hide resolved
qlib/data/dataset/handler.py Outdated Show resolved Hide resolved
qlib/data/dataset/handler.py Outdated Show resolved Hide resolved
@@ -685,7 +685,7 @@ def cast(cls, handler: "DataHandlerLP") -> "DataHandlerLP":
the converted processed data
"""
new_hd: DataHandlerLP = object.__new__(DataHandlerLP)
new_hd.from_cast = True # add a mark for the casted instance
new_hd.from_cast = True # add a mark for the cast instance
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not casted?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The past tense of cast is: cast in past simple is cast. and past participle is cast. There is no casted.

https://engverbs.com/grammar/cast#:~:text=The%20past%20tense%20of%20cast%20is%3A%20cast%20in,cast.%20The%20past%20participle%20of%20cast%20is%20cast.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry for my bad grammar...

@you-n-g you-n-g merged commit cc01812 into microsoft:main Nov 20, 2022
@you-n-g
Copy link
Collaborator

you-n-g commented Nov 20, 2022

It looks great now!
Merged.
Thanks.

@qianyun210603 qianyun210603 deleted the qy_docstring_2 branch November 22, 2022 02:09
@you-n-g you-n-g added the documentation Improvements or additions to documentation label Dec 9, 2022
qianyun210603 added a commit to qianyun210603/qlib that referenced this pull request Mar 23, 2023
* fix gramma error in doc strings

* fix typos in exchange.py

* fix typos and gramma errors

* fix typo and rename function param to avoid shading python keyword

* remove redundant parathesis; pass kwargs to parent class

* fix pyblack

* further correction

* assign -> be assigned to
qianyun210603 added a commit to qianyun210603/qlib that referenced this pull request Mar 23, 2023
* fix gramma error in doc strings

* fix typos in exchange.py

* fix typos and gramma errors

* fix typo and rename function param to avoid shading python keyword

* remove redundant parathesis; pass kwargs to parent class

* fix pyblack

* further correction

* assign -> be assigned to
qianyun210603 added a commit to qianyun210603/qlib that referenced this pull request Mar 23, 2023
* fix gramma error in doc strings

* fix typos in exchange.py

* fix typos and gramma errors

* fix typo and rename function param to avoid shading python keyword

* remove redundant parathesis; pass kwargs to parent class

* fix pyblack

* further correction

* assign -> be assigned to
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants