Skip to content

[AppConfig] mypy fixes#18858

Merged
5 commits merged intoAzure:masterfrom
seankane-msft:appconfig-mypy
Jun 17, 2021
Merged

[AppConfig] mypy fixes#18858
5 commits merged intoAzure:masterfrom
seankane-msft:appconfig-mypy

Conversation

@seankane-msft
Copy link
Copy Markdown
Contributor

closes #18540

@seankane-msft seankane-msft added the App Configuration Azure.ApplicationModel.Configuration label May 21, 2021
@seankane-msft seankane-msft self-assigned this May 21, 2021
match_condition=MatchConditions.Unconditionally,
**kwargs
): # type: (str, Optional[str], Optional[str], Optional[MatchConditions], **Any) -> ConfigurationSetting
): # type: (str, Optional[str], Optional[str], Optional[MatchConditions], **Any) -> Optional[ConfigurationSetting]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This seems odd to me. Is there a way that you can call this method and it will return None instead of a ConfigurationSetting? This could almost be considered a breaking change if we used to document this as always returning a ConfigurationSetting.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the catch

@ghost
Copy link
Copy Markdown

ghost commented Jun 17, 2021

Hello @seankane-msft!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

etag="*", # type: Optional[str]
match_condition=MatchConditions.Unconditionally, # type: Optional[MatchConditions]
**kwargs # type: Any
): # type: (...) -> Union[None, ConfigurationSetting]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This still seems odd to me, but if it's the expected behavior then I think we should probably update the :rtype: in the docstring and perhaps explain in :return: what case None could be returned

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ah I didn't see the auto-merge tag, sorry

@ghost ghost merged commit 22cc32f into Azure:master Jun 17, 2021
iscai-msft added a commit to iscai-msft/azure-sdk-for-python that referenced this pull request Jun 17, 2021
…into get_testserver_working

* 'master' of https://github.com/Azure/azure-sdk-for-python: (55 commits)
  [AppConfig] mypy fixes (Azure#18858)
  [translation] renames (Azure#19285)
  [Key Vault] Update metadata for release (Azure#19286)
  [AppConfig] enable samples (Azure#18857)
  KeyVaultBackupOperation -> KeyVaultBackupResult (Azure#19284)
  renaming (Azure#19280)
  [Key Vault] Custom polling method for admin backup client (Azure#19204)
  [textanalytics] add ARM template + run samples in CI (Azure#19270)
  removed example from description (Azure#18781)
  [Key Vault] Update READMEs with RBAC information (Azure#19275)
  Sync eng/common directory with azure-sdk-tools for PR 1688 (Azure#19272)
  update all ubuntu vmImage to 20.04 (Azure#19227)
  add base class for feedback (Azure#19265)
  Enable tests for integration samples (Azure#18531)
  docs: fix a few simple typos (Azure#19127)
  Increment package version after release of azure-eventgrid (Azure#19197)
  Increment package version after release of azure-monitor-query (Azure#19208)
  earliest versions of communication identity tests are set up improperly. skip 1.0.0 in regression testing (Azure#19258)
  Run mypy in azure-keyvault-administration CI (Azure#19246)
  [text analytics] change return type of analyze actions to list of list (Azure#18994)
  ...
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

App Configuration Azure.ApplicationModel.Configuration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[AppConfig] Enable mypy

2 participants