Skip to content

Upgrade types-PyYAML from ^5.4.3 to ^5.4.6#500

Merged
Stannislav merged 1 commit intomainfrom
update-yaml-types
Aug 23, 2021
Merged

Upgrade types-PyYAML from ^5.4.3 to ^5.4.6#500
Stannislav merged 1 commit intomainfrom
update-yaml-types

Conversation

@Stannislav
Copy link
Copy Markdown
Contributor

@Stannislav Stannislav commented Aug 22, 2021

Description

The minimal version for types-PyYAML in pyproject.toml was upgraded from ^5.4.3 to ^5.4.6.

Things done:

  • Manually edit pyproject.toml
  • Run poetry lock --no-update
  • Remove obsolete comments in config_loader.py

Motivation behind this PR?

Version 5.4.6 contains a fix for wrong type annotations. The fix
and additional type annotations were added in this PR:
python/typeshed#5828

With an older version of typtes-PyYAML:

$ poetry show types-pyyaml
name         : types-pyyaml
version      : 5.4.5
description  : Typing stubs for PyYAML

$ mypy scanapi
scanapi/config_loader.py:59: error: Argument 2 to "add_constructor" has incompatible type "Callable[[scanapi.config_loader.Loader, Node], Any]"; expected "Callable[[yaml.loader.Loader, Node], Any]"  [arg-type]
scanapi/config_loader.py:59: error: Argument 3 to "add_constructor" has incompatible type "Type[scanapi.config_loader.Loader]"; expected "yaml.loader.Loader"  [arg-type]
Found 2 errors in 1 file (checked 22 source files)

with the latest one:

$ poetry show types-pyyaml
name         : types-pyyaml
version      : 5.4.6
description  : Typing stubs for PyYAML

$ mypy scanapi 
Success: no issues found in 22 source files

What type of change is this?

Chore.

Checklist

  • I have added a changelog entry / my PR does not need a new changelog entry. Instructions.
  • I have added/updated unit tests. Instructions.
  • New and existing unit tests pass locally with my changes. Instructions
  • I have self-documented code my changes by adding docstring(s) and comment(s). Instructions
  • Current PR does not significantly decrease the code coverage and docstring coverage.
  • My code follows the style guidelines of this project.
  • I have run ScanAPI locally and manually tested my changes. Instructions.
  • I have squashed my commits. Instructions.

Issue

No issue

@Stannislav Stannislav requested review from a team as code owners August 22, 2021 17:36
@github-actions
Copy link
Copy Markdown

@Stannislav your pull request is missing a changelog!

@hebertjulio
Copy link
Copy Markdown
Member

Thank @Stannislav for the contribution! 😄

Copy link
Copy Markdown
Member

@Pradhvan Pradhvan left a comment

Choose a reason for hiding this comment

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

Thank You for you contribution @Stannislav

Version 5.4.6 contains a fix for wrong type annotations. The fix
and additional type annotations were added in this PR:
python/typeshed#5828
@Stannislav Stannislav self-assigned this Aug 23, 2021
@Stannislav Stannislav merged commit f304230 into main Aug 23, 2021
@Stannislav Stannislav deleted the update-yaml-types branch August 23, 2021 18:06
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.

3 participants