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

More type hinting for the codebase #265

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

PinkShnack
Copy link
Contributor

@PinkShnack PinkShnack commented Nov 26, 2024

Continuing to solve the issue #198.

  • dclab/features
  • dclab/features/emodulus
  • Go through type hinted functions and remove duplicated docstring info

dclab/features/bright.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Nov 26, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.23%. Comparing base (c2fbfbd) to head (4d48eab).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #265      +/-   ##
==========================================
- Coverage   91.24%   91.23%   -0.02%     
==========================================
  Files         105      105              
  Lines        7793     7814      +21     
==========================================
+ Hits         7111     7129      +18     
- Misses        682      685       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@PinkShnack PinkShnack marked this pull request as draft November 26, 2024 13:18
@@ -242,7 +253,8 @@ def get_viscosity_mc_pbs_herold_2017(
return eta


def get_viscosity_water_kestin_1978(temperature: float = 23.0):
def get_viscosity_water_kestin_1978(
temperature: float = 23.0) -> float | npt.NDArray:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If the input type is a float here, then the output can only be a float, and not an ndarray.
However, in get_viscosity above the temperature argument can be a float or an ndarray. Is this correct?

@PinkShnack
Copy link
Contributor Author

@paulmueller
When you get a chance, please review this! I have a comment above also that I wasn't sure about.

@PinkShnack PinkShnack self-assigned this Nov 29, 2024
@PinkShnack PinkShnack marked this pull request as ready for review November 29, 2024 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant