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

Config.__getattr__ should raise AttributeError #129

Merged
merged 3 commits into from
Dec 17, 2020
Merged

Conversation

hadrianl
Copy link
Contributor

Description

Make __getattr__ to raise AttributeError instead of return it.Avoid using try except

Motivation and Context

User should be responsible for getting the wrong attribute.To return AttributeError might cause unexpected problems.Raise it instead.Also, aviod using try except syntax

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

  • [ x ] Fix bugs
  • Add new feature
  • Update documentation

@you-n-g you-n-g requested a review from bxdd December 17, 2020 02:46
@ghost
Copy link

ghost commented Dec 17, 2020

CLA assistant check
All CLA requirements met.

@you-n-g
Copy link
Collaborator

you-n-g commented Dec 17, 2020

@hadrianl
Many thanks for your contribution!

@hadrianl
Copy link
Contributor Author

Excellent Project!keep up the good work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants