Skip to content

Conversation

@bmwant
Copy link

@bmwant bmwant commented Dec 19, 2024

@github-actions github-actions bot changed the base branch from main to develop December 19, 2024 12:44
@github-actions
Copy link

Your PR was set to target main, PRs should be target develop
The base branch of this PR has been automatically changed to develop, please check that there are no merge conflicts.

@bmwant
Copy link
Author

bmwant commented Dec 19, 2024

@sergeyklay can you trigger unittests workflow for the branch, I will update failing tests if any
Screenshot 2024-12-19 at 13 52 33

@joaovl5
Copy link

joaovl5 commented Jan 19, 2025

Please add this!!

@du-song
Copy link

du-song commented Feb 3, 2025

it will be awesome if we can have this.

@bmwant
Copy link
Author

bmwant commented Feb 4, 2025

@joke2k do you have time to take a look at this?

@Ksauder
Copy link

Ksauder commented Feb 19, 2025

This would be really nice!

@ashwanthbalakrishnan5
Copy link

@joke2k Any update on why this is not merged ?

@JackMorganNZ
Copy link

@joke2k Would be great if this could be merged, currently the package is highlighting a lot of errors in our repositories without this.

@joke2k joke2k requested a review from Copilot August 17, 2025 10:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds type hints to various methods in the Environ class to improve code documentation and IDE support. The changes address issue #533 by providing explicit type annotations for method parameters and return values.

Key changes:

  • Added type imports from the typing module including Union, TypeVar, List, Tuple, and Dict
  • Added type hints to method signatures for str, bytes, bool, int, float, list, tuple, dict, url, and various URL parsing methods
  • Specified return types and parameter types using Union types to handle both actual values and NoValue sentinel

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
You can also share your feedback on Copilot code review for a chance to win a $100 gift card. Take the survey.

channels = channels_url

def path(self, var, default=NOTSET, **kwargs):
def path(self, var, default: Union['Path', NoValue] = NOTSET, **kwargs) -> 'Path':
Copy link

Copilot AI Aug 17, 2025

Choose a reason for hiding this comment

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

Using string quotes for forward references ('Path') is unnecessary here since the Path class is already defined in the codebase. Consider using Union[Path, NoValue] instead of Union['Path', NoValue].

Suggested change
def path(self, var, default: Union['Path', NoValue] = NOTSET, **kwargs) -> 'Path':
def path(self, var, default: Union[Path, NoValue] = NOTSET, **kwargs) -> Path:

Copilot uses AI. Check for mistakes.
@bmwant
Copy link
Author

bmwant commented Aug 18, 2025

@joke2k do you want me to update code as per copilot comments?
Current approach is still valid by the PEP https://peps.python.org/pep-0484/,
but is encouraged to be more specific in 3.9+ by this one https://peps.python.org/pep-0585/

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.

6 participants